Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-options

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-options - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

.idea/gulp-options.iml

11

index.js

@@ -7,6 +7,7 @@ /**

read: function(argv) {
var optionsClean = [];
var optionsClean = {};
argv.slice(2, argv.length).forEach(function(p) {
if (p.indexOf('--') === 0 && p.length !== 2) {
optionsClean.push(p.replace('--', ''));
[param, value] = p.replace('--', '').split('=');
optionsClean[param] = (value) ? value : '';
}

@@ -21,4 +22,8 @@ });

}
return (this.options.indexOf(param) !== -1);
return (Object.prototype.hasOwnProperty.call(this.options, param));
},
get: function(param) {
return (this.has(param)) ? this.options[param] : undefined;
}
};
{
"name": "gulp-options",
"version": "1.0.2",
"version": "1.1.0",
"description": "Allow to pass gulp options and retreive them",

@@ -5,0 +5,0 @@ "main": "index.js",

# gulp-options
Add options parameters in Gulp to be used like:
```bash
gulp build --myopt1 --myopt2
gulp build --myopt1 --myopt2 --myopt3=val
```

@@ -35,2 +35,8 @@ ## Install

}
// Get option value
if (options.has('env')) {
const env = options.get('env');
return gulp.src('src/**/*.*').pipe(gulp.dest(`${env}/`));
}
});

@@ -42,5 +48,6 @@

```bash
gulp mytask --prod # source files moved to release/ folder
gulp mytask --debug # source files moved to debug/ folder
gulp mytask # source files moved to dev/ folder
gulp mytask --prod # source files moved to release/ folder
gulp mytask --debug # source files moved to debug/ folder
gulp mytask --env=customenv # source files moved to customenv/ folder
gulp mytask # source files moved to dev/ folder
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc