mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-26 07:22:21 +00:00
Fix asc not printing text format to console by default
This commit is contained in:
parent
00e6d613a9
commit
8cfc479cc0
@ -482,6 +482,7 @@ exports.main = function main(argv, options, callback) {
|
|||||||
// Prepare output
|
// Prepare output
|
||||||
if (!args.noEmit) {
|
if (!args.noEmit) {
|
||||||
let hasStdout = false;
|
let hasStdout = false;
|
||||||
|
let hasOutput = false;
|
||||||
|
|
||||||
if (args.outFile != null) {
|
if (args.outFile != null) {
|
||||||
if (/\.was?t$/.test(args.outFile) && args.textFile == null) {
|
if (/\.was?t$/.test(args.outFile) && args.textFile == null) {
|
||||||
@ -513,6 +514,7 @@ exports.main = function main(argv, options, callback) {
|
|||||||
writeStdout(wasm.output);
|
writeStdout(wasm.output);
|
||||||
hasStdout = true;
|
hasStdout = true;
|
||||||
}
|
}
|
||||||
|
hasOutput = true;
|
||||||
|
|
||||||
// Post-process source map
|
// Post-process source map
|
||||||
if (wasm.sourceMap != null) {
|
if (wasm.sourceMap != null) {
|
||||||
@ -566,6 +568,7 @@ exports.main = function main(argv, options, callback) {
|
|||||||
writeStdout(asm);
|
writeStdout(asm);
|
||||||
hasStdout = true;
|
hasStdout = true;
|
||||||
}
|
}
|
||||||
|
hasOutput = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write WebIDL
|
// Write WebIDL
|
||||||
@ -585,6 +588,7 @@ exports.main = function main(argv, options, callback) {
|
|||||||
writeStdout(idl);
|
writeStdout(idl);
|
||||||
hasStdout = true;
|
hasStdout = true;
|
||||||
}
|
}
|
||||||
|
hasOutput = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write TypeScript definition
|
// Write TypeScript definition
|
||||||
@ -604,10 +608,11 @@ exports.main = function main(argv, options, callback) {
|
|||||||
writeStdout(tsd);
|
writeStdout(tsd);
|
||||||
hasStdout = true;
|
hasStdout = true;
|
||||||
}
|
}
|
||||||
|
hasOutput = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write text (must be last)
|
// Write text (must be last)
|
||||||
if (args.textFile != null) {
|
if (args.textFile != null || !hasOutput) {
|
||||||
let wat;
|
let wat;
|
||||||
if (args.textFile && args.textFile.length) {
|
if (args.textFile && args.textFile.length) {
|
||||||
stats.emitCount++;
|
stats.emitCount++;
|
||||||
|
2
dist/asc.js
vendored
2
dist/asc.js
vendored
File diff suppressed because one or more lines are too long
2
dist/asc.js.map
vendored
2
dist/asc.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user