Socket
Socket
Sign inDemoInstall

grunt-shell

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-shell - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

11

package.json
{
"name": "grunt-shell",
"version": "0.3.0",
"version": "0.3.1",
"description": "Run shell commands",

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

"spawn",
"process",
"cli"

@@ -29,2 +30,5 @@ ],

},
"dependencies": {
"stripcolorcodes": "~0.1.0"
},
"devDependencies": {

@@ -41,3 +45,6 @@ "grunt": "~0.4.0"

"type": "MIT"
}
},
"files": [
"tasks/shell.js"
]
}
'use strict';
module.exports = function (grunt) {
var exec = require('child_process').exec;
var stripColors = require('stripcolorcodes');
var _ = grunt.util._;

@@ -32,2 +33,12 @@

var captureOutput = function (child, output) {
if (grunt.option('color') === false) {
child.on('data', function (data) {
output.write(stripColors(data));
});
} else {
child.pipe(output);
}
};
grunt.verbose.writeln('Command:', cmd.yellow);

@@ -37,9 +48,9 @@ grunt.verbose.writeflags(options, 'Options');

if (options.stdout || grunt.option('verbose')) {
cp.stdout.pipe(process.stdout);
captureOutput(cp.stdout, process.stdout);
}
if (options.stderr || grunt.option('verbose')) {
cp.stderr.pipe(process.stderr);
captureOutput(cp.stderr, process.stderr);
}
});
};
.npmignore
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