Skip to content

Commit 891eaa9

Browse files
Add new release script based on the npm version command
1 parent c0ae8a2 commit 891eaa9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
output=dist/jspdf.min.js
99
options="-m -c --wrap --stats"
10-
version="`python -c 'import time;t=time.gmtime(time.time());print("1.%d.%d" % (t[0] - 2014, t[7]))'`"
10+
version="$(node -p -e "require('./package.json').version")"
1111
npm_libs="node_modules/cf-blob.js/Blob.js node_modules/filesaver.js/FileSaver.js node_modules/adler32cs/adler32cs.js"
1212
libs="${npm_libs} `find libs/* -maxdepth 2 -type f | grep .js$ | grep -v -E '(\.min|BlobBuilder\.js$|Downloadify|demo|deps|test)'`"
1313
files="jspdf.js plugins/*js"

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
},
2727
"scripts": {
2828
"start": "ws",
29-
"build": "npm install && bower install && ./build.sh"
29+
"build": "npm install && bower install && ./build.sh",
30+
"version": "npm run build && git add -A dist"
3031
}
3132
}

0 commit comments

Comments
 (0)