canadian-pub
v1.1.0
Published
Feel like npm is drunk or maybe you are and want to verify what gets published via `npm publish`? canadian-pub has you covered.
Downloads
4
Maintainers
Readme
canadian-pub
Successor to irish-pub
. Feel like npm is drunk or maybe you are and want to verify what gets published via npm publish
? canadian-pub
has you covered.
Usage
➝ canadian-pub
npm will publish [email protected] as vweevers, including the following files eh:
package.json
index.js
LICENSE.md
README.md
bin/canadian-pub.js
Similar to npm pack --dry-run
but less noisy and printing files to stdout instead of stderr. In addition canadian-pub
protects you from common mistakes, printing errors to stderr and exiting with code 1
:
3 blacklisted:
.travis.yml
deps/snappy/snappy.sln
.nyc_output/9daf5b463f958a9071a9efcc7fbac6d9
This makes it useful as an npm prepublish(Only)
script. Add --silent
or -s
to skip printing files. E.g.:
"scripts": {
"prepublishOnly": "canadian-pub -s"
}
Install
With npm do:
npm install canadian-pub --save-dev
Or globally:
npm install canadian-pub -g
CLI
canadian-pub [root] [--silent/-s] [--verbose]
See description of root
and options below.
API
canadianPub([root][, options])
Invokes npm pack --ignore-scripts
to determine what would be included during npm publish
. The root
argument should be the path to the package to publish and defaults to the current working directory.
Returns a readable stream that yields file paths relative to root
.
Options
silent
: boolean. Skip printing files.verbose
: boolean (cli only). Print stack traces.
License
MIT © 2018-present Vincent Weevers. Adapted from irish-pub
, copyright © 2014 Thorsten Lorenz.