mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-14 22:41:20 -04:00
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:
parent
89f751e651
commit
7eb2e58a38
6 changed files with 8 additions and 17209 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -9,3 +9,5 @@ npm-*
|
|||
/.nyc_output
|
||||
/coverage
|
||||
/dist.js
|
||||
/vm.js
|
||||
/vm.min.js
|
||||
|
|
2
.npmignore
Normal file
2
.npmignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
/.nyc_output
|
||||
/coverage
|
|
@ -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)"
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
11
vm.min.js
vendored
11
vm.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue