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. 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. [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 = ensureArray( options.plugins );
this.plugins.forEach( plugin => { options = this.plugins.reduce( ( acc, plugin ) => {
if ( plugin.options ) { if ( plugin.options ) return plugin.options( acc ) || acc;
options = plugin.options( options ) || options; return acc;
} }, options);
});
this.entry = options.entry; this.entry = options.entry;
this.entryId = null; this.entryId = null;

Loading…
Cancel
Save