Publish to NPM

This commit is contained in:
Ray Schamp
2016-09-23 14:01:18 -04:00
parent 201ceaba77
commit d91ddf4158
6 changed files with 31 additions and 19860 deletions

View File

@@ -1,8 +1,23 @@
language: node_js
node_js:
- "4.2"
- "stable"
- "4.2"
- "stable"
sudo: false
cache:
directories:
- node_modules
after_script:
- |
# RELEASE_BRANCHES and NPM_TOKEN defined in Travis settings panel
declare exitCode
$(npm bin)/travis-after-all
exitCode=$?
if [[
$exitCode = 0 &&
$RELEASE_BRANCHES =~ $TRAVIS_BRANCH &&
$TRAVIS_PULL_REQUEST = "false"
]]; then
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
npm --no-git-tag-version version $(node -p -e "require('./package.json').version")-${TRAVIS_COMMIT:0:5}
npm publish
fi