extra-npm
Version:
Common utility commands for npm packages.
34 lines (24 loc) • 766 B
Plain Text
Picks out and massages parameters.
Gets nearest package path.
Gets root package path.
Similar: [which], [validate], [rev-parse].
enpm rev-parse [args] [options]
parameter: name of parameter to get
--package, --root-package
args: arguments for parameter
-> value of parameter
-> -1 otherwise (error)
Options:
--help: view this help
--silent: enable showing only -1 on error (0)
Environment variables:
$NPM_SILENT # enable showing only -1 on error (0)
$ enpm rev-parse --package
get nearest package path
$ enpm rev-parse --root-package
get root package path
References
"pkg-dir"
[which]: https://github.com/nodef/extra-npm/wiki/which
[validate]: https://github.com/nodef/extra-npm/wiki/validate
[rev-parse]: https://github.com/nodef/extra-npm/wiki/rev-parse