2017-07-06 18:34:31 +02:00
|
|
|
/// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" />
|
|
|
|
|
2017-07-25 12:48:02 +02:00
|
|
|
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)
|
2017-07-25 12:48:02 +02:00
|
|
|
.then(() => {
|
|
|
|
fs.writeFileSync("built/full-" + pxtc.BINARY_UF2, resp.outfiles[pxtc.BINARY_UF2], {
|
|
|
|
encoding: "base64"
|
|
|
|
})
|
|
|
|
})
|
2017-07-06 18:34:31 +02:00
|
|
|
}
|