Skip to content

Commit a5a17cc

Browse files
committed
use package.json version in lib .version and in minified preamble
1 parent bd9984e commit a5a17cc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*
3636
* envify automatically rewrites this during the release process
3737
*/
38-
exports.version = process.env.TRAVIS_BRANCH;
38+
exports.version = process.env.npm_package_version;
3939

4040
/**
4141
*

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
"test-integration": "TEST_MODE=integration karma start --single-run",
1313
"webpack": "webpack",
1414
"browserify": "browserify index.js --standalone WatsonSpeech --outfile dist/watson-speech.js --transform envify",
15-
"minify": "uglifyjs --source-map --compress --mangle --output dist/watson-speech.min.js --beautify \"beautify=false,preamble='// IBM Watson Speech JavaScript SDK\\n// $TRAVIS_BRANCH\\n// Generated at `date`\\n// Copyright IBM ($npm_package_license)\\n// $npm_package_homepage'\" dist/watson-speech.js",
15+
"minify": "uglifyjs --source-map --compress --mangle --output dist/watson-speech.min.js --beautify \"beautify=false,preamble='// IBM Watson Speech JavaScript SDK\\n// $npm_package_version\\n// Generated at `date`\\n// Copyright IBM ($npm_package_license)\\n// $npm_package_homepage'\" dist/watson-speech.js",
1616
"watchify": "watchify index.js --standalone WatsonSpeech --outfile dist/watson-speech.js --debug --verbose",
1717
"build": "npm run webpack && npm run minify",
18+
"verson": "npm run build",
1819
"doc": "jsdoc -c scripts/jsdoc/config.json --debug",
1920
"watch-doc": "nodemon --watch ./ --ignore ./doc --ext js,tmpl,json --exec npm run doc"
2021
},

0 commit comments

Comments
 (0)