mirror of https://github.com/sveltejs/svelte
commit
8ef88729a8
@ -0,0 +1,11 @@
|
||||
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));
|
@ -0,0 +1,15 @@
|
||||
cd `dirname $0`/..
|
||||
|
||||
# fetch svelte-app
|
||||
rm -rf scripts/svelte-app
|
||||
node_modules/.bin/degit sveltejs/template scripts/svelte-app
|
||||
|
||||
# update repl-viewer.css based on template
|
||||
cp scripts/svelte-app/public/global.css static/repl-viewer.css
|
||||
|
||||
# remove src (will be recreated client-side) and node_modules
|
||||
rm -rf scripts/svelte-app/src
|
||||
rm -rf scripts/svelte-app/node_modules
|
||||
|
||||
# build svelte-app.json
|
||||
node scripts/build-svelte-app-json.js `find scripts/svelte-app -type f`
|
Loading…
Reference in new issue