🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

gulp-modify

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-modify - npm Package Compare versions

Comparing version

to
0.1.0

gulp/bump.coffee

22

index.js

@@ -1,5 +0,5 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.9.2
(function() {
'use strict';
var PLUGIN_NAME, through;
var PLUGIN_NAME, gutil, through;

@@ -10,2 +10,4 @@ PLUGIN_NAME = 'gulp-modify';

gutil = require('gutil');
module.exports = function(options) {

@@ -16,10 +18,18 @@ if (options == null) {

return through.obj(function(file, enc, next) {
var content, fileModifier;
var _error, content, error, fileModifier;
error = null;
if (file.isBuffer()) {
if (fileModifier = options.fileModifier) {
content = fileModifier(file, file.contents.toString('utf8'));
file.contents = new Buffer(content);
try {
content = fileModifier(file, file.contents.toString('utf8'));
file.contents = new Buffer(content);
} catch (_error) {
_error = _error;
error = new gutil.PluginError('Error', _error, {
showStack: true
});
}
}
}
return next(null, file);
return next(error, file);
});

@@ -26,0 +36,0 @@ };

@@ -9,3 +9,3 @@ {

},
"version": "0.0.5",
"version": "0.1.0",
"license": "MIT",

@@ -30,9 +30,11 @@ "main": "index.js",

"dependencies": {
"through2": "*"
"through2": "*",
"gulp-util": "*"
},
"devDependencies": {
"mocha": "*",
"expect": "*",
"coffee-script": "*"
"coffee-script": "*",
"gulp": "*",
"gulp-util": "*",
"gulp-bump": "*"
}
}

Sorry, the diff of this file is not supported yet