lope-cli | Transform NPM package scripts into simple CLIs
Transform NPM package scripts into simple CLIs. Optionally, tap into
NPM configs to pass options to said
scripts. Check out lope-example for
a basic package.json
example.
Install
$ npm install --global lope-cli
Usage
$ lope --helpTransform NPM package scripts into simple CLIs Usage: $ lope [package] <script> [--* <*>] Options: --global, -g Indicates package is installed globally Examples: $ # Run the test script against current package $ lope test $ # Run the test script against local package $ lope lope-example test $ # Run the test script against global package $ lope lope-example test --global $ # Run the echo script, with options, against current package $ lope echo --echo hello $ # Run the echo script, with options, against local package $ lope lope-example echo --echo hello $ # Run the echo script, with options, against global package $ lope lope-example echo --echo hello --global
Against local package via the command line:
$ npm install lope-example$ lope lope-example test$ lope lope-example echo --echo hellohello
npm config
, via the command line:
Against local package, leveraging $ npm install lope-example$ npm config set lope-example:echo hello$ lope lope-example test$ lope lope-example echohello
Against local package via NPM script:
$ npm run test$ npm run echohello
Against global package via the command line:
$ npm install --global lope-example$ lope lope-example test --global$ lope lope-example echo --echo hello --globalhello
npm config
, via the command line:
Against global package, leveraging $ npm install --global lope-example$ npm config set lope-example:echo hello$ lope lope-example test --global$ lope lope-example echo --globalhello
Against current package via the command line:
$ lope test$ lope echo --echo hellohello
Against current package via NPM script:
$ npm run echo2hello
Maintainers
- Rocky Madden (@rockymadden)