Skip to content

Commit 22cf914

Browse files
committed
generate functional output in sandbox
1 parent 76d05e0 commit 22cf914

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

playgrounds/sandbox/run.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,25 @@ for (const generate of /** @type {const} */ (['client', 'server'])) {
8585
}
8686

8787
write(output_js, compiled.js.code + '\n//# sourceMappingURL=' + path.basename(output_map));
88-
8988
write(output_map, compiled.js.map.toString());
9089

90+
// generate with templatingMode: 'functional'
91+
if (generate === 'client') {
92+
const compiled = compile(source, {
93+
dev: true,
94+
filename: input,
95+
generate,
96+
runes: argv.values.runes,
97+
templatingMode: 'functional'
98+
});
99+
100+
const output_js = `${cwd}/output/${generate}/${file}.functional.js`;
101+
const output_map = `${cwd}/output/${generate}/${file}.functional.js.map`;
102+
103+
write(output_js, compiled.js.code + '\n//# sourceMappingURL=' + path.basename(output_map));
104+
write(output_map, compiled.js.map.toString());
105+
}
106+
91107
if (compiled.css) {
92108
write(output_css, compiled.css.code);
93109
}

0 commit comments

Comments
 (0)