pxt-ev3/cmds/cmds.ts

15 lines
462 B
TypeScript
Raw Normal View History

2017-07-06 18:34:31 +02:00
/// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" />
import * as fs from 'fs';
2018-01-05 16:33:09 +01:00
const deploy = require("./editor/deploy")
2017-07-06 18:34:31 +02:00
export function deployCoreAsync(resp: pxtc.CompileResult) {
2018-01-05 16:33:09 +01:00
return deploy.deployCoreAsync(resp, process.env["PXT_SERIAL"] ? false : true)
.then(() => {
fs.writeFileSync("built/full-" + pxtc.BINARY_UF2, resp.outfiles[pxtc.BINARY_UF2], {
encoding: "base64"
})
})
2017-07-06 18:34:31 +02:00
}