Socket
Socket
Sign inDemoInstall

gulp-rollup

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-rollup - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

38

index.js

@@ -22,39 +22,29 @@ 'use strict';

return through.obj(function(file, enc, callback) {
var _this = this;
if (!file.path) { return callback(); }
if (!file.relative) { return; }
if (file.isStream()) {
return _this.emit('error',
new PluginError(PLUGIN_NAME, 'Streaming not supported'));
return callback(new PluginError(PLUGIN_NAME, 'Streaming not supported'));
}
try {
var stats = fs.lstatSync(file.relative);
var stats = fs.lstatSync(file.path);
if (stats.isFile()) {
options.entry = file.path;
rollup.rollup(options).then(function(bundle){
try {
var res = bundle.generate(options);
file.contents = new Buffer(res.code);
_this.push(file);
callback();
} catch (err) {
var ge = new PluginError(PLUGIN_NAME, err.message);
_this.emit('error', ge);
}
}, function(err){
var ge = new PluginError(PLUGIN_NAME, err.message);
_this.emit('error', ge);
rollup.rollup(options).then(function(bundle) {
var res = bundle.generate(options);
file.contents = new Buffer(res.code);
callback(null, file);
}, function(err) {
setImmediate(function() {
callback(new PluginError(PLUGIN_NAME, err));
});
});
}
} catch (err) {
callback(new PluginError(PLUGIN_NAME, err));
}
catch (err) {
return _this.emit('error',
new PluginError(PLUGIN_NAME, err.message));
}
}, function(){
}, function() {
this.emit('end');
});
};
{
"name": "gulp-rollup",
"version": "1.1.2",
"version": "1.2.0",
"description": "gulp plugin for Rollup ES6 module bundler",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "gulp ci"
},

@@ -15,2 +15,3 @@ "repository": {

"gulp",
"gulpplugin",
"rollup",

@@ -33,3 +34,3 @@ "es6"

"gulp": "^3.9.0",
"gulp-depcheck": "^1.0.1",
"gulp-depcheck": "^1.1.0",
"gulp-help": "^1.6.1",

@@ -36,0 +37,0 @@ "gulp-jasmine": "^2.2.0",

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

# gulp-rollup
# gulp-rollup [![npm][npm-image]][npm-url] [![Dependency Status][david-image]][david-url] [![Build Status][travis-image]][travis-url]
Gulp plugin for [Rollup](https://www.npmjs.com/package/rollup) ES6 module bundler.
[![Dependency Status](https://david-dm.org/mcasimir/gulp-rollup.svg)](https://david-dm.org/mcasimir/gulp-rollup)
[![Build Status](https://travis-ci.org/mcasimir/gulp-rollup.svg)](https://travis-ci.org/mcasimir/gulp-rollup)
## Install

@@ -29,1 +25,8 @@

Refer to [Rollup docs](https://www.npmjs.com/package/rollup) for a list of valid options.
[npm-url]: https://npmjs.org/package/gulp-rollup
[npm-image]: https://img.shields.io/npm/v/gulp-rollup.svg
[david-url]: https://david-dm.org/mcasimir/gulp-rollup
[david-image]: https://img.shields.io/david/mcasimir/gulp-rollup/master.svg
[travis-url]: https://travis-ci.org/mcasimir/gulp-rollup
[travis-image]: https://img.shields.io/travis/mcasimir/gulp-rollup/master.svg

Sorry, the diff of this file is not supported yet

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