-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1904 from sveltejs/repl-downloads
REPL downloads
- Loading branch information
Showing
7 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters