Fix td extension.
This commit is contained in:
parent
598c62dbf3
commit
d9548446ff
@ -13,15 +13,16 @@ namespace pxt.editor {
|
|||||||
}, name: data.meta.name
|
}, name: data.meta.name
|
||||||
})
|
})
|
||||||
}, {
|
}, {
|
||||||
id: "td",
|
id: "td",
|
||||||
canImport: data => data.meta.cloudId == "microbit.co.uk" && data.meta.editor == "touchdevelop",
|
canImport: data => data.meta.cloudId == "microbit.co.uk" && data.meta.editor == "touchdevelop",
|
||||||
importAsync: (project, data) =>
|
importAsync: (project, data) =>
|
||||||
project.createProjectAsync({
|
project.createProjectAsync({
|
||||||
filesOverride: { "main.blocks": "", "main.ts": " " },
|
filesOverride: { "main.blocks": "", "main.ts": " " },
|
||||||
name: data.meta.name
|
name: data.meta.name
|
||||||
}).then(() => project.convertTouchDevelopToTypeScriptAsync(data.source))
|
})
|
||||||
.then(text => this.textEditor.overrideFile(text))
|
.then(() => project.convertTouchDevelopToTypeScriptAsync(data.source))
|
||||||
}]
|
.then(text => project.overrideTypescriptFile(text))
|
||||||
|
}]
|
||||||
};
|
};
|
||||||
return Promise.resolve<pxt.editor.ExtensionResult>(res);
|
return Promise.resolve<pxt.editor.ExtensionResult>(res);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user