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

gulp-wrap

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-wrap - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

52

index.js

@@ -5,3 +5,2 @@ 'use strict';

var BufferStreams = require('bufferstreams');
var consolidate = require('consolidate');

@@ -14,2 +13,3 @@ var extend = require('node.extend');

var tryit = require('tryit');
var VinylBufferStream = require('vinyl-bufferstream');

@@ -40,10 +40,3 @@ var PLUGIN_NAME = 'gulp-wrap';

function gulpWrapTransform(file, enc, cb) {
var self = this;
if (file.isNull()) {
cb(null, file);
return;
}
return through.obj(function gulpWrapTransform(file, enc, cb) {
function compile(contents, done) {

@@ -85,34 +78,15 @@ // attempt to parse the file contents for JSON or YAML files

if (file.isStream()) {
file.contents = file.contents.pipe(new BufferStreams(function(none, buf, done) {
compile(buf, function(err, contents) {
process.nextTick(function() {
if (err) {
self.emit('error', err);
done(err);
} else {
done(null, contents);
self.push(file);
}
cb();
});
});
}));
return;
}
var run = new VinylBufferStream(compile);
var self = this;
compile(file.contents, function(err, contents) {
process.nextTick(function() {
if (err) {
self.emit('error', err);
} else {
file.contents = contents;
self.push(file);
}
cb();
});
run(file, function(err, contents) {
if (err) {
self.emit('error', err);
} else {
file.contents = contents;
self.push(file);
}
cb();
});
}
return through.obj(gulpWrapTransform);
});
};
{
"name": "gulp-wrap",
"version": "0.10.0",
"version": "0.10.1",
"description": "A gulp plugin to wrap the stream contents with a template.",

@@ -11,2 +11,9 @@ "repository": "adamayres/gulp-wrap",

},
"contributors": [
{
"name": "Shinnosuke Watanabe",
"email": "snnskwtnb@gmail.com",
"url": "https://github.com/shinnn"
}
],
"licenses": [

@@ -37,3 +44,2 @@ {

"dependencies": {
"bufferstreams": "^0.0.2",
"consolidate": "^0.10.0",

@@ -47,6 +53,7 @@ "es6-promise": "^2.0.1",

"through2": "^0.6.3",
"tryit": "^1.0.1"
"tryit": "^1.0.1",
"vinyl-bufferstream": "^1.0.0"
},
"devDependencies": {
"eslint": "^0.11.0",
"eslint": "^0.12.0",
"istanbul": "^0.3.5",

@@ -53,0 +60,0 @@ "istanbul-coveralls": "^1.0.1",

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