Skip to content

Commit 323e0b6

Browse files
committed
Simplify build script
1 parent d2aba72 commit 323e0b6

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

build-all.mjs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
#!/usr/bin/env zx
22

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`
84
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')
105

116
// Prepare `/dist`
127
const pkg = await fs.readJson('package.json')
138
pkg.scripts = undefined
149
await fs.writeJson('dist/package.json', pkg, { spaces: 2 })
1510
await fs.copy('README.md', 'dist/README.md')
1611
await fs.copy('LICENSE', 'dist/LICENSE')
12+
await fs.copy('dist/dist/index.umd.js', 'dist/dist/index.umd.cjs')
1713
await $`cd dist && npx publint`
1814

19-
if (args.includes('--packageOnly')) process.exit()
15+
if (argv.packageOnly) process.exit()
2016

2117
await $`npm run build`
2218

0 commit comments

Comments
 (0)