mapd3 icon indicating copy to clipboard operation
mapd3 copied to clipboard

add npm publish script

Open micahstubbs opened this issue 7 years ago • 3 comments

This should make it easier for us to publish updates to npm

here's a pseudocode shell script:

# bump version in package.json, following semver
# do this with sed or some similiar 
# unix text editing scripting
VERSION=v0.12.2
git add package.json
git status
git commit -m "bump version to $VERSION"
git push

git tag $VERSION
git push origin --tags

npm publish

micahstubbs avatar Feb 26 '18 22:02 micahstubbs

Doesn't npm already have the version bump built in? https://docs.npmjs.com/cli/version

andrewseidl avatar Feb 26 '18 22:02 andrewseidl

ah yes, yes it does 💡

let's use this

micahstubbs avatar Feb 26 '18 23:02 micahstubbs

ah this way to organize scripts also looks useful

"scripts": {
  "preversion": "npm test",
  "version": "npm run build && git add -A dist",
  "postversion": "git push && git push --tags && rm -rf build/temp"
}

(an example from https://docs.npmjs.com/cli/version)

micahstubbs avatar Feb 26 '18 23:02 micahstubbs