Generate UF2 files when no HID available
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
/// <reference path="../node_modules/pxt-core/typings/globals/node/index.d.ts"/>
|
||||
/// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" />
|
||||
|
||||
import * as fs from 'fs';
|
||||
|
||||
require("./editor")
|
||||
|
||||
declare namespace pxt.editor {
|
||||
@ -9,4 +11,9 @@ declare namespace pxt.editor {
|
||||
|
||||
export function deployCoreAsync(resp: pxtc.CompileResult) {
|
||||
return pxt.editor.deployCoreAsync(resp, process.env["PXT_SERIAL"] ? false : true)
|
||||
.then(() => {
|
||||
fs.writeFileSync("built/full-" + pxtc.BINARY_UF2, resp.outfiles[pxtc.BINARY_UF2], {
|
||||
encoding: "base64"
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user