nsf

npm-script-flags

NPM library that allows you to use flags in `npm run` command

Showing:

Popularity

Downloads/wk

0

GitHub Stars

3

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

NPM Script flags

This is a library that allows you to use flags in npm run command.

Install

$ npm install npm-script-flags

Why do we need extra library?

In regards to documentation for use flags we need use double dash option:

$ npm run gulp build -- --production

Thanks to this library you can write just:

$ npm run gulp build --production

or even simpler:

$ npm run gulp build -p

Usage

var Flags = require('npm-script-flags');

Flags.define('production-flag', {
    longhand: 'production', // for `--production` handle
    shorthand: 'p' // for `-p` handle
});

if (Flags.isFlag('production-flag')) {
    // Flag is enabled so do something...
}

License

MIT (http://www.opensource.org/licenses/mit-license.php)

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial