fix build script ignoring last lines
This commit is contained in:
13
build.ts
13
build.ts
@@ -78,6 +78,8 @@ class Minifier {
|
||||
flush: (controller) => {
|
||||
this.buffer += "\n";
|
||||
controller.enqueue(this.processChunk());
|
||||
controller.enqueue(this.lines.join("\n") + "\n");
|
||||
this.lines = [];
|
||||
},
|
||||
});
|
||||
|
||||
@@ -139,7 +141,7 @@ async function build(output: WritableStreamDefaultWriter<string>) {
|
||||
const readable = file.readable.pipeThrough(new TextDecoderStream())
|
||||
.pipeThrough(new TextLineStream());
|
||||
|
||||
output.write(`
|
||||
await output.write(`
|
||||
;/*******************************
|
||||
;* ${path}
|
||||
;*******************************/
|
||||
@@ -147,7 +149,7 @@ async function build(output: WritableStreamDefaultWriter<string>) {
|
||||
|
||||
for await (const line of readable) {
|
||||
if (!line.startsWith("include ")) {
|
||||
output.write(`${line}\n`);
|
||||
await output.write(`${line}\n`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,15 +168,16 @@ async function build(output: WritableStreamDefaultWriter<string>) {
|
||||
);
|
||||
}
|
||||
|
||||
output.write(asmRawRepresentations.join("\n\n"));
|
||||
await output.write(asmRawRepresentations.join("\n\n"));
|
||||
|
||||
output.write(`
|
||||
await output.write(`
|
||||
;
|
||||
; RESERVED RAM SPACE
|
||||
;
|
||||
`);
|
||||
|
||||
output.write(await Deno.readTextFile(reservedSpacePath));
|
||||
await output.write(await Deno.readTextFile(reservedSpacePath));
|
||||
await output.close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user