Socket
Socket
Sign inDemoInstall

grunt-rollup

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-rollup - npm Package Compare versions

Comparing version 0.8.0 to 1.0.0

dest

8

package.json
{
"name": "grunt-rollup",
"description": "Grunt plugin for rollup - next-generation ES6 module bundler",
"version": "0.8.0",
"version": "1.0.0",
"homepage": "https://github.com/chrisprice/grunt-rollup",

@@ -26,6 +26,6 @@ "author": {

"devDependencies": {
"grunt": "^1.0.1",
"grunt": "^0.4.5",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-nodeunit": "^1.0.0"
"grunt-contrib-nodeunit": "^0.4.1"
},

@@ -40,5 +40,5 @@ "peerDependencies": {

"dependencies": {
"bluebird": "^3.3.4",
"es6-promise": "^3.0.2",
"rollup": "^0.x"
}
}

@@ -8,3 +8,3 @@ # grunt-rollup

## Getting Started
This plugin requires Grunt `>=0.4.0`
This plugin requires Grunt `~0.4.5`

@@ -64,3 +64,3 @@ If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

### Usage with Plugins
###Usage with Plugins

@@ -73,6 +73,6 @@ ```js

options: {
plugins: [
babel({
exclude: './node_modules/**'
})
plugins: [
babel({
exclude: './node_modules/**'
})
]

@@ -88,30 +88,2 @@ },

#### Plugin getter
Some plugins are stateful and this doesn't play nice with multiple bundles. For example the `rollup-plugin-babel` plugin keeps a track of used `babel` helpers, and passing the configured plugin only once will cause the helpers to leak from one bundle to another. To prevent that, pass a function that returns an array of plugins, like this:
```js
var babel = require('rollup-plugin-babel');
grunt.initConfig({
rollup: {
options: {
plugins: function() {
return [
babel({
exclude: './node_modules/**'
})
];
}
},
files: {
'dest/bundle.js': 'src/entry.js',
'dest/bundle2.js': 'src/entry2.js',
},
},
});
```
This way the plugin will be refreshed for each bundle.
## Contributing

@@ -118,0 +90,0 @@ In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

@@ -11,3 +11,3 @@ /*

var Promise = require('bluebird').Promise;
var Promise = require('es6-promise').Promise;
var rollup = require('rollup');

@@ -24,3 +24,3 @@ var path = require('path');

external: [],
format: 'es',
format: 'es6',
exports: 'auto',

@@ -48,18 +48,10 @@ moduleId: null,

var entry;
if (f.src.length > 1) {
entry = f.src;
grunt.log.writeln('Multiple entry points detected. Be sure to include rollup-plugin-multi-entry in plugins.');
} else {
entry = f.src[0];
if (!grunt.file.exists(entry)) {
grunt.fail.warn('Entry point "' + entry + '" not found.');
}
grunt.fail.warn('Multiple entry points are not supported.');
}
var plugins = options.plugins;
var entry = f.src[0];
if (typeof plugins === 'function') {
plugins = plugins();
if (!grunt.file.exists(entry)) {
grunt.fail.warn('Entry point "' + entry + '" not found.');
}

@@ -70,3 +62,3 @@

external: options.external,
plugins: plugins
plugins : options.plugins
}).then(function(bundle) {

@@ -73,0 +65,0 @@

Sorry, the diff of this file is not supported yet

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