Skip to content

Commit edc0412

Browse files
committed
add prepublish script for creating minified file
This means the minified file needn't be (manually) updated each commit.
1 parent 84e9844 commit edc0412

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ISTANBUL = node_modules/.bin/istanbul
22
UGLIFYJS = node_modules/.bin/uglifyjs
3-
XYZ = node_modules/.bin/xyz --message X.Y.Z --tag X.Y.Z
3+
XYZ = node_modules/.bin/xyz --message X.Y.Z --tag X.Y.Z --script scripts/prepublish
44

55
SRC = base64.js
66
MIN = $(patsubst %.js,%.min.js,$(SRC))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"istanbul": "0.2.x",
2020
"mocha": "1.18.x",
2121
"uglify-js": "2.4.x",
22-
"xyz": "0.2.x"
22+
"xyz": "0.3.x"
2323
}
2424
}

scripts/prepublish

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
rm -f base64.min.js
5+
make base64.min.js
6+
git add base64.min.js

0 commit comments

Comments
 (0)