nicer sandbox output (#15730)

pull/15729/head
Rich Harris 6 months ago committed by GitHub
parent 9cafdd89d0
commit 73acf6e7f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -56,7 +56,7 @@ for (const generate of /** @type {const} */ (['client', 'server'])) {
}); });
write( write(
`${cwd}/output/${file}.json`, `${cwd}/output/ast/${file}.json`,
JSON.stringify( JSON.stringify(
ast, ast,
(key, value) => (typeof value === 'bigint' ? ['BigInt', value.toString()] : value), (key, value) => (typeof value === 'bigint' ? ['BigInt', value.toString()] : value),
@ -66,7 +66,7 @@ for (const generate of /** @type {const} */ (['client', 'server'])) {
try { try {
const migrated = migrate(source); const migrated = migrate(source);
write(`${cwd}/output/${file}.migrated.svelte`, migrated.code); write(`${cwd}/output/migrated/${file}`, migrated.code);
} catch (e) { } catch (e) {
console.warn(`Error migrating ${file}`, e); console.warn(`Error migrating ${file}`, e);
} }

Loading…
Cancel
Save