You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/site/scripts/build-svelte-app-json.js

12 lines
272 B

const fs = require('fs');
const files = [];
for (const path of process.argv.slice(2)) {
if (!path.includes('/.')) {
files.push({ path: path.slice(19), data: fs.readFileSync(path).toString() });
}
}
fs.writeFileSync('static/svelte-app.json', JSON.stringify(files));