Skip to content

Commit 65244d9

Browse files
refactor(scripts): tidy bundle.sh
1 parent 751eb2b commit 65244d9

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "Mark <mark@remarkablemark.org>",
66
"scripts": {
77
"build": "npm run clean && vite build",
8-
"bundle": "scripts/bundle.sh",
8+
"bundle": "bash scripts/bundle.sh",
99
"clean": "rm -rf dist",
1010
"increment-levels": "tsx scripts/increment-levels.ts",
1111
"lint": "eslint .",

‎scripts/bundle.sh‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
# build bundle
44
BUNDLE=true npm run build -- --base=./
55

6-
# zip file
7-
zip -r "dist/$(npm pkg get name | tr -d \")-$(npm pkg get version | tr -d \").zip" dist
8-
echo
9-
find dist -type f -name '*.zip'
10-
11-
# open folder
6+
# compress directory into single archive
127
if [[ $CI != 'true' ]]; then
8+
NAME=$(npm pkg get name | tr -d \")
9+
VERSION=$(npm pkg get version | tr -d \")
10+
zip -r "dist/$NAME-$VERSION.zip" dist
11+
echo
12+
find dist -type f -name '*.zip'
1313
open dist
1414
fi

0 commit comments

Comments
 (0)