From 2ebe96e563ac2f3bc0242f7f04420e820ff9e86b Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Fri, 5 Jan 2018 15:33:09 +0000 Subject: [PATCH] Fix command line deploy --- cmds/cmds.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmds/cmds.ts b/cmds/cmds.ts index 25adc56c..2084f8b5 100644 --- a/cmds/cmds.ts +++ b/cmds/cmds.ts @@ -2,14 +2,10 @@ import * as fs from 'fs'; -require("./editor/deploy") - -declare namespace pxt.editor { - function deployCoreAsync(resp: pxtc.CompileResult, disconnect?: boolean): Promise; -} +const deploy = require("./editor/deploy") export function deployCoreAsync(resp: pxtc.CompileResult) { - return pxt.editor.deployCoreAsync(resp, process.env["PXT_SERIAL"] ? false : true) + 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"