New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-exec

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-exec - npm Package Compare versions

Comparing version 0.0.3 to 1.0.0

18

index.js

@@ -6,15 +6,23 @@ /*jshint node:true */

var es = require('event-stream'),
gutil = require('gulp-util'),
path = require('path'),
exec = require('child_process').exec;
module.exports = function(command){
module.exports = function(command, opt){
if (!command) {
throw new Error('command is blank');
}
// defaults
if (!opt) {
opt = {
silent: false
};
}
return es.map(function (file, cb){
var filepath = path.resolve(file.path);
var cmd = command.replace(/\$file/g, filepath);
opt.file = file;
var cmd = gutil.template(command, opt);
exec(cmd, function (error, stdout, stderr) {
if (stderr) {
console.log(stderr);
gutil.log(stderr);
}

@@ -25,3 +33,3 @@ if (stdout) {

if (stdout) {
console.log(stdout);
gutil.log(stdout);
}

@@ -28,0 +36,0 @@ cb(error, file);

{
"name": "gulp-exec",
"description": "exec plugin for gulp",
"version": "0.0.3",
"version": "1.0.0",
"homepage": "https://github.com/robrich/gulp-exec",

@@ -13,3 +13,4 @@ "repository": "git://github.com/robrich/gulp-exec.git",

"dependencies": {
"event-stream": "*"
"event-stream": "*",
"gulp-util":"~1.2.0"
},

@@ -16,0 +17,0 @@ "devDependencies": {

@@ -15,6 +15,8 @@ ![status](https://secure.travis-ci.org/robrich/gulp-exec.png?branch=master)

gulp.task('reset', function() {
gulp.files('./**/**').pipe(exec('git checkout $file'));
gulp.src('./**/**').pipe(exec('git checkout <%= file.path %>'));
});
```
Note this now uses `gulp-util` for templating, a breaking change from previous versions.
LICENSE

@@ -21,0 +23,0 @@ -------

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