File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env zx
2
2
3
- const args = process . argv . slice ( 2 )
4
-
5
- await $ `npm run lint`
6
- await $ `npm run check`
7
- await $ `npx svelte-package`
3
+ await $ `npm run lint && npm run check && npx svelte-package`
8
4
const out = await $ `npx vite build -c vite.dist.config.js`
9
- await fs . copy ( 'dist/dist/index.umd.js' , 'dist/dist/index.umd.cjs' )
10
5
11
6
// Prepare `/dist`
12
7
const pkg = await fs . readJson ( 'package.json' )
13
8
pkg . scripts = undefined
14
9
await fs . writeJson ( 'dist/package.json' , pkg , { spaces : 2 } )
15
10
await fs . copy ( 'README.md' , 'dist/README.md' )
16
11
await fs . copy ( 'LICENSE' , 'dist/LICENSE' )
12
+ await fs . copy ( 'dist/dist/index.umd.js' , 'dist/dist/index.umd.cjs' )
17
13
await $ `cd dist && npx publint`
18
14
19
- if ( args . includes ( '-- packageOnly' ) ) process . exit ( )
15
+ if ( argv . packageOnly ) process . exit ( )
20
16
21
17
await $ `npm run build`
22
18
You can’t perform that action at this time.
0 commit comments