File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
const sh = require ( 'shelljs' ) ;
2
- const fs = require ( 'fs' )
2
+ const fs = require ( 'fs' ) ;
3
3
4
- sh . cd ( __dirname + '/../' )
4
+ sh . cd ( __dirname + '/../' ) ;
5
5
6
6
// fetch svelte app
7
- sh . rm ( '-rf' , 'scripts/svelte-app' )
8
- sh . exec ( 'npx degit sveltejs/template#v3 scripts/svelte-app' )
7
+ sh . rm ( '-rf' , 'scripts/svelte-app' ) ;
8
+ sh . exec ( 'npx degit sveltejs/template scripts/svelte-app' ) ;
9
9
10
10
// remove src (will be recreated client-side) and node_modules
11
- sh . rm ( '-rf' , 'scripts/svelte-app/src' )
12
- sh . rm ( '-rf' , 'scripts/svelte-app/node_modules' )
11
+ sh . rm ( '-rf' , 'scripts/svelte-app/src' ) ;
12
+ sh . rm ( '-rf' , 'scripts/svelte-app/node_modules' ) ;
13
13
14
14
// build svelte-app.json
15
- const appPath = 'scripts/svelte-app'
16
- let files = [ ]
15
+ const appPath = 'scripts/svelte-app' ;
16
+ const files = [ ] ;
17
17
18
18
for ( const path of sh . find ( appPath ) . filter ( p => fs . lstatSync ( p ) . isFile ( ) ) ) {
19
19
files . push ( { path : path . slice ( appPath . length + 1 ) , data : fs . readFileSync ( path ) . toString ( ) } ) ;
You can’t perform that action at this time.
0 commit comments