Browse Source

Merge branch 'master' of https://github.com/rollup/rollup

legacy-quote-reserved-properties
Rich-Harris 8 years ago
parent
commit
addad1d444
  1. 2
      README.md
  2. 9
      src/Bundle.js

2
README.md

@ -36,6 +36,8 @@
Rollup can be used via a [JavaScript API](https://github.com/rollup/rollup/wiki/JavaScript-API) or a [Command Line Interface](https://github.com/rollup/rollup/wiki/Command-Line-Interface). Install with `npm install -g rollup` and run `rollup --help` to get started.
If the command line's not your jam, there's also a [step-by-step tutorial video series](https://code.lengstorf.com/learn-rollup-js/) (with accompanying written walkthrough).
[Dive into the wiki](https://github.com/rollup/rollup/wiki) when you're ready to learn more about Rollup and ES6 modules.

9
src/Bundle.js

@ -31,11 +31,10 @@ export default class Bundle {
this.plugins = ensureArray( options.plugins );
this.plugins.forEach( plugin => {
if ( plugin.options ) {
options = plugin.options( options ) || options;
}
});
options = this.plugins.reduce( ( acc, plugin ) => {
if ( plugin.options ) return plugin.options( acc ) || acc;
return acc;
}, options);
this.entry = options.entry;
this.entryId = null;

Loading…
Cancel
Save