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

gulp-choose-files

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-choose-files - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

22

index.js

@@ -8,3 +8,3 @@ 'use strict';

module.exports = function(options) {
var opts = extend({prop: 'relative'}, options);
var opts = extend({key: 'relative', save: false}, options);
var msg = opts.message || 'Which files do you want to write?';

@@ -16,2 +16,7 @@ var questions = new Questions();

return through.obj(function(file, enc, next) {
if (opts.skip) {
next(null, file);
return;
}
var key = fileKey(file, opts);

@@ -23,4 +28,17 @@ paths.push(key);

var stream = this;
if (typeof opts.choices === 'string') {
opts.choices = [opts.choices];
}
if (Array.isArray(opts.choices)) {
opts.choices.forEach(function(filepath) {
stream.push(files[filepath]);
});
next();
return;
}
questions.choices('files', msg, paths);
questions.ask('files', function(err, answers) {
questions.ask('files', opts, function(err, answers) {
if (err || !answers.files) {

@@ -27,0 +45,0 @@ next(err);

16

package.json
{
"name": "gulp-choose-files",
"description": "Gulp plugin that prompts you to choose the files pass through the stream.",
"version": "0.1.1",
"homepage": "https://github.com/jonschlinkert/gulp-choose-files",
"description": "Gulp plugin that prompts you to choose the files to pass through the stream.",
"version": "0.1.2",
"homepage": "https://github.com/generate/gulp-choose-files",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/gulp-choose-files",
"repository": "generate/gulp-choose-files",
"bugs": {
"url": "https://github.com/jonschlinkert/gulp-choose-files/issues"
"url": "https://github.com/generate/gulp-choose-files/issues"
},

@@ -28,7 +28,7 @@ "license": "MIT",

"devDependencies": {
"assemble": "^0.11.0",
"assemble": "^0.14.0",
"engine-handlebars": "^0.8.0",
"gulp": "^3.9.1",
"gulp-format-md": "^0.1.9",
"mocha": "^2.4.5"
"mocha": "^2.5.3"
},

@@ -43,2 +43,3 @@ "keywords": [

"gulpplugin",
"pick",
"prompt",

@@ -59,3 +60,2 @@ "question",

"related": {
"description": "Other gulp plugins I maintain",
"list": [

@@ -62,0 +62,0 @@ "gulp-condense",

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