From 072da010d8f602897e7d1c2b9031e2c84a6c3115 Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Wed, 9 Sep 2020 11:42:51 -0400 Subject: [PATCH] fix: add artifact --- dist/cli.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/cli.js b/dist/cli.js index 92fa620..d227b29 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -172,7 +172,7 @@ function compileProject(args, ascArgv, options, cb) { outDir = path.join(baseDir, outDir, target); var watFile = path.relative(baseDir, path.join(outDir, name + ".wat")); var wasmFile = path.relative(baseDir, path.join(outDir, name + ".wasm")); - if (args.wat && (args.outDir && !(hasOutput(ascArgv, ".wat") || ((_b = config.options) === null || _b === void 0 ? void 0 : _b.textFile)))) { + if (args.wat && (!(hasOutput(ascArgv, ".wat") || ((_b = config.options) === null || _b === void 0 ? void 0 : _b.textFile)))) { ascArgv.push("--textFile", watFile); } if (args.outDir || !(hasOutput(ascArgv, ".wasm") || ((_c = config.options) === null || _c === void 0 ? void 0 : _c.binaryFile))) { @@ -186,4 +186,4 @@ function compileProject(args, ascArgv, options, cb) { function hasOutput(ascArgv, suffix) { return ascArgv.some(function (s) { return s.endsWith(suffix); }); } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NsaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDJDQUErQjtBQUMvQix5Q0FBNkI7QUFDN0IsMERBQThDO0FBQzlDLDBFQUE4RDtBQUM5RCxxQ0FBeUI7QUFZekIsU0FBZ0IsSUFBSSxDQUNsQixHQUFhLEVBQ2IsT0FBNEIsRUFDNUIsUUFBNkI7SUFEN0Isd0JBQUEsRUFBQSxZQUE0QjtJQUc1QixJQUFJLElBQUksR0FBZ0I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