2019-10-09 06:57:55 +02:00
|
|
|
/// <reference path="../node_modules/pxt-core/localtypings/pxtarget.d.ts" />
|
|
|
|
/// <reference path="../node_modules/pxt-core/built/pxtblocks.d.ts" />
|
|
|
|
/// <reference path="../node_modules/pxt-core/built/pxtcompiler.d.ts" />
|
|
|
|
/// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" />
|
2018-01-04 01:18:39 +01:00
|
|
|
/// <reference path="../node_modules/pxt-core/built/pxteditor.d.ts"/>
|
|
|
|
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
|
|
|
|
|
2019-10-09 06:57:55 +02:00
|
|
|
import { deployCoreAsync, initAsync } from "./deploy";
|
|
|
|
import { showUploadDialogAsync } from "./dialogs";
|
|
|
|
|
|
|
|
export let projectView: pxt.editor.IProjectView;
|
2018-01-04 01:18:39 +01:00
|
|
|
|
2018-01-30 00:21:15 +01:00
|
|
|
pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): Promise<pxt.editor.ExtensionResult> {
|
2018-01-04 01:18:39 +01:00
|
|
|
pxt.debug('loading pxt-ev3 target extensions...')
|
2019-10-09 06:57:55 +02:00
|
|
|
projectView = opts.projectView;
|
2019-09-30 20:13:28 +02:00
|
|
|
|
2018-01-04 01:18:39 +01:00
|
|
|
const res: pxt.editor.ExtensionResult = {
|
2019-10-09 06:57:55 +02:00
|
|
|
deployAsync: deployCoreAsync,
|
|
|
|
showUploadInstructionsAsync: showUploadDialogAsync
|
2018-01-04 01:18:39 +01:00
|
|
|
};
|
2019-10-09 06:57:55 +02:00
|
|
|
|
2018-01-04 01:18:39 +01:00
|
|
|
initAsync().catch(e => {
|
|
|
|
// probably no HID - we'll try this again upon deployment
|
|
|
|
})
|
|
|
|
return Promise.resolve<pxt.editor.ExtensionResult>(res);
|
2017-07-06 18:34:31 +02:00
|
|
|
}
|