Publish to NPM

Authenticate with NPM via .npmrc and publish the package version + "-[git sha]".

Remove vm and vm.min.js, they'll be built before the package is published to NPM and available on installation. When installing from git, the build step will run on npm install.
This commit is contained in:
Ray Schamp 2016-09-25 13:59:16 -04:00
parent 89f751e651
commit 7eb2e58a38
6 changed files with 8 additions and 17209 deletions

2
.gitignore vendored
View file

@ -9,3 +9,5 @@ npm-*
/.nyc_output
/coverage
/dist.js
/vm.js
/vm.min.js

2
.npmignore Normal file
View file

@ -0,0 +1,2 @@
/.nyc_output
/coverage

View file

@ -17,7 +17,9 @@ after_script:
$RELEASE_BRANCHES =~ $TRAVIS_BRANCH &&
$TRAVIS_PULL_REQUEST = "false"
]]; then
./node_modules/.bin/gh-pages -x -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git -d playground -m "Travis build ${TRAVIS_BUILD_NUMBER}"
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
git config --global user.email $(git log --pretty=format:"%ce" -n1)
git config --global user.name $(git log --pretty=format:"%cn" -n1)
./node_modules/.bin/gh-pages -x -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git -d playground -m "Build for $(git log --pretty=format:%H)"

View file

@ -11,7 +11,7 @@
},
"main": "./dist.js",
"scripts": {
"postinstall": "./node_modules/.bin/webpack",
"prepublish": "./node_modules/.bin/webpack --bail",
"start": "webpack-dev-server --host 0.0.0.0 --content-base .",
"test": "make test"
},

17196
vm.js

File diff suppressed because it is too large Load diff

11
vm.min.js vendored

File diff suppressed because one or more lines are too long