mapd3
mapd3 copied to clipboard
add npm publish script
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
Doesn't npm already have the version bump built in? https://docs.npmjs.com/cli/version
ah yes, yes it does 💡
let's use this
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)