mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-22 07:49:38 +01:00
♻️ Update build.js to improve cli out
This commit is contained in:
parent
97da5441ee
commit
029ef5adb4
@ -23,14 +23,17 @@ $.api("", true)
|
|||||||
f=> s.echo(f).to(out)
|
f=> s.echo(f).to(out)
|
||||||
)(s.cat(out));
|
)(s.cat(out));
|
||||||
const file_dts= file_root+".d.ts";
|
const file_dts= file_root+".d.ts";
|
||||||
s.echo(bundleDTS(file_dts)).to(filesOut(file_dts));
|
const file_dts_out= filesOut(file_dts);
|
||||||
|
echo(` ${file_dts_out}`)
|
||||||
|
s.echo(bundleDTS(file_dts)).to(file_dts_out);
|
||||||
|
echo("⚡ Done");
|
||||||
toDDE(out, filesOut(file, "dde"));
|
toDDE(out, filesOut(file, "dde"));
|
||||||
}
|
}
|
||||||
$.exit(0);
|
$.exit(0);
|
||||||
|
|
||||||
function toDDE(file, out){
|
function toDDE(file, out){
|
||||||
const name= "dde";
|
const name= "dde";
|
||||||
echo(`\n ${out} (${file} → globalThis.${name})\n`);
|
echo(` ${out} (${file} → globalThis.${name})`);
|
||||||
|
|
||||||
let content= s.cat(file).toString().split(/export ?{/);
|
let content= s.cat(file).toString().split(/export ?{/);
|
||||||
content.splice(1, 0, `\nglobalThis.${name}= {`);
|
content.splice(1, 0, `\nglobalThis.${name}= {`);
|
||||||
@ -42,7 +45,7 @@ $.api("", true)
|
|||||||
"})();"
|
"})();"
|
||||||
].join("\n")).to(out);
|
].join("\n")).to(out);
|
||||||
|
|
||||||
echo("⚡ Done\n");
|
echo("⚡ Done");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.parse();
|
.parse();
|
||||||
|
Loading…
Reference in New Issue
Block a user