New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

npm-script-flags

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-script-flags

Add custom arguments to your npm scripts

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
1
-66.67%
Maintainers
2
Weekly downloads
 
Created
Source

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)

Keywords

npm

FAQs

Package last updated on 02 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts