UNPKG

extra-npm

Version:

Common utility commands for npm packages.

62 lines (48 loc) 1.53 kB
Pushes changes to both Git and NPM. Updates version in package.json. Publishes package to NPM registry. Adds all changes to repository index. Creates a commit with given message. Pushes package to remote Git repository. Similar: [push], [clone], [init]. enpm push [options] [message] message: commit message (version) Options: --help: show this help -n, --no: no publish to npm -v, --version: update version (patch) -1, --patch: update patch version -2, --minor: update minor version -3, --major: update major version -g, --github: update github details -u, --username: github username -p, --password: github password Environment variables: NPMPUSHNO: no publish to npm (0/1) NPMPUSHVERSION: update which version (patch/minor/major/pre...) NPMPUSHPREFIX: commit message prefix NPMPUSHMESSAGE: commit message NPMPUSHGITHUB: update github details (0/1) GITHUB_USERNAME: github username GITHUB_PASSWORD: github password example package: pg current version: 7.0.0 commit "v7.0.1" $ enpm push --no commit "v7.0.1", publish 7.0.1 $ enpm push commit "patch update", publish 7.0.1 $ enpm push "patch update" commit "minor update", publish 7.1.0 $ export NPMPUSHNO=0 $ enpm push "minor update" -v minor commit ":+1: major update", publish 8.0.0 $ export NPMPUSHNO=0 $ export NPMPUSHPREFIX=:+1: $ enpm push "major update" -3 References npm publish git push [push]: https://github.com/nodef/extra-npm/wiki/push [clone]: https://github.com/nodef/extra-npm/wiki/clone [init]: https://github.com/nodef/extra-npm/wiki/init