|
|
|
|
@ -35,6 +35,7 @@ for (const generate of ['client', 'server']) {
|
|
|
|
|
const source = fs.readFileSync(input, 'utf-8');
|
|
|
|
|
|
|
|
|
|
const output_js = `${cwd}/output/${generate}/${file}.js`;
|
|
|
|
|
const output_map = `${cwd}/output/${generate}/${file}.js.map`;
|
|
|
|
|
const output_css = `${cwd}/output/${generate}/${file}.css`;
|
|
|
|
|
|
|
|
|
|
mkdirp(path.dirname(output_js));
|
|
|
|
|
@ -54,7 +55,11 @@ for (const generate of ['client', 'server']) {
|
|
|
|
|
runes: argv.runes
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fs.writeFileSync(output_js, compiled.js.code);
|
|
|
|
|
fs.writeFileSync(
|
|
|
|
|
output_js,
|
|
|
|
|
compiled.js.code + '\n//# sourceMappingURL=' + path.basename(output_map)
|
|
|
|
|
);
|
|
|
|
|
fs.writeFileSync(output_map, compiled.js.map.toString());
|
|
|
|
|
if (compiled.css) {
|
|
|
|
|
fs.writeFileSync(output_css, compiled.css.code);
|
|
|
|
|
}
|
|
|
|
|
|