can-npm-publish v1.3.6
can-npm-publish 
A command line tool that check to see if npm publish is possible.
Check list
All check list is passed, exit status will be 0.
- Check that the package's name is valid
- Check that the package is not
private:true - Check that
package@versionis already published in npm registry
Install
Install with npm:
npm install can-npm-publishUsage
Usage
$ can-npm-publish [directory|package.json path]
Options
--verbose show detail of errors
Examples
$ can-npm-publish
$ echo $? # 0 or 1All check list is passed, exit status will be 0.
If has any error, exit status will be 1.
If you want to know details of the error, you can use --verbose flag.
$ can-npm-publish --verbose
almin@0.13.10 is already published
$ echo $?
1UseCase
Run can-npm-publish before npm publish:
can-npm-publish && npm publishYou can use it for publishing without choice.
For example, it is useful for using with lerna.
Publish all packages if it is possible.
lerna exec --bail=false -- "can-npm-publish && npm publish"In this use-case, you should use @monorepo-utils/publish instead of can-npm-publish.
Because, @monorepo-utils/publish wrapped can-npm-publish.
Changelog
See Releases page.
Running tests
Install devDependencies and Run npm test:
npm i -d && npm testContributing
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
Author
License
MIT © azu