rollup 0.50.0 → 0.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/rollup +1 -1
- package/dist/rollup.browser.js +81 -19
- package/dist/rollup.es.js +81 -19
- package/dist/rollup.js +81 -19
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Rollup is a module bundler for JavaScript which compiles small pieces of code in
|
|
|
32
32
|
|
|
33
33
|
## Quick Start Guide
|
|
34
34
|
|
|
35
|
-
Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/#command-line-reference) with an optional configuration file, or else through its [JavaScript API](https://rollupjs.org/#javascript-api). Run `rollup --help` to see the available options and parameters. The
|
|
35
|
+
Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/#command-line-reference) with an optional configuration file, or else through its [JavaScript API](https://rollupjs.org/#javascript-api). Run `rollup --help` to see the available options and parameters. The starter project templates, [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app), demonstrate common configuration options, and more detailed instructions are available throughout the [user guide](http://rollupjs.org/).
|
|
36
36
|
|
|
37
37
|
### Commands
|
|
38
38
|
|
package/bin/rollup
CHANGED
|
@@ -250,7 +250,7 @@ function isNumber (x) {
|
|
|
250
250
|
|
|
251
251
|
var help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-v, --version Show version number\n-h, --help Show this help message\n-c, --config Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-w, --watch Watch files in bundle and rebuild on changes\n-i, --input Input (alternative to <entry file>)\n-o, --output.file <output> Output (if absent, prints to stdout)\n-f, --output.format [es] Type of output (amd, cjs, es, iife, umd)\n-e, --external Comma-separate list of module IDs to exclude\n-g, --globals Comma-separate list of `module ID:Global` pairs\n Any module IDs defined here are added to external\n-n, --name Name for UMD export\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n--amd.id ID for AMD module (default is anonymous)\n--amd.define Function to use in place of `define`\n--no-strict Don't emit a `\"use strict\";` in the generated modules.\n--no-indent Don't indent result\n--environment <values> Settings passed to config file (see example)\n--no-conflict Generate a noConflict method for UMD globals\n--silent Don't print warnings\n--intro Content to insert at top of bundle (inside wrapper)\n--outro Content to insert at end of bundle (inside wrapper)\n--banner Content to insert at top of bundle (outside wrapper)\n--footer Content to insert at end of bundle (outside wrapper)\n--interop Include interop block (true by default)\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --output=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://github.com/rollup/rollup/wiki\n";
|
|
252
252
|
|
|
253
|
-
var version = "0.50.
|
|
253
|
+
var version = "0.50.1";
|
|
254
254
|
|
|
255
255
|
var modules = {};
|
|
256
256
|
|
package/dist/rollup.browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rollup.js v0.50.
|
|
3
|
-
|
|
2
|
+
Rollup.js v0.50.1
|
|
3
|
+
Wed Nov 08 2017 06:27:53 GMT+0100 (CET) - commit e773b589d9a05ba3d51ad44d3016ee6dfa2d2fd5
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
@@ -6595,6 +6595,15 @@ class ConditionalExpression extends Node$1 {
|
|
|
6595
6595
|
return testValue ? this.consequent.getValue() : this.alternate.getValue();
|
|
6596
6596
|
}
|
|
6597
6597
|
|
|
6598
|
+
hasEffects ( options ) {
|
|
6599
|
+
return (
|
|
6600
|
+
this.included
|
|
6601
|
+
|| this.test.hasEffects( options )
|
|
6602
|
+
|| (this.testValue === UNKNOWN_VALUE && (this.consequent.hasEffects( options ) || this.alternate.hasEffects( options )))
|
|
6603
|
+
|| (this.testValue ? this.consequent.hasEffects( options ) : this.alternate.hasEffects( options ))
|
|
6604
|
+
);
|
|
6605
|
+
}
|
|
6606
|
+
|
|
6598
6607
|
render ( code, es ) {
|
|
6599
6608
|
if ( !this.module.bundle.treeshake ) {
|
|
6600
6609
|
super.render( code, es );
|
|
@@ -6605,22 +6614,16 @@ class ConditionalExpression extends Node$1 {
|
|
|
6605
6614
|
super.render( code, es );
|
|
6606
6615
|
}
|
|
6607
6616
|
|
|
6608
|
-
else
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
} else {
|
|
6617
|
-
code.remove( this.start, this.alternate.start );
|
|
6618
|
-
code.remove( this.alternate.end, this.end );
|
|
6619
|
-
if ( this.alternate.type === 'SequenceExpression' ) {
|
|
6620
|
-
code.prependRight( this.alternate.start, '(' );
|
|
6621
|
-
code.appendLeft( this.alternate.end, ')' );
|
|
6617
|
+
else {
|
|
6618
|
+
const branchToRetain = this.testValue ? this.consequent : this.alternate;
|
|
6619
|
+
|
|
6620
|
+
code.remove( this.start, branchToRetain.start );
|
|
6621
|
+
code.remove( branchToRetain.end, this.end );
|
|
6622
|
+
if ( branchToRetain.type === 'SequenceExpression' ) {
|
|
6623
|
+
code.prependLeft( branchToRetain.start, '(' );
|
|
6624
|
+
code.appendRight( branchToRetain.end, ')' );
|
|
6622
6625
|
}
|
|
6623
|
-
|
|
6626
|
+
branchToRetain.render( code, es );
|
|
6624
6627
|
}
|
|
6625
6628
|
}
|
|
6626
6629
|
}
|
|
@@ -7555,6 +7558,64 @@ class ReturnStatement extends Statement {
|
|
|
7555
7558
|
}
|
|
7556
7559
|
}
|
|
7557
7560
|
|
|
7561
|
+
class SequenceExpression extends Node$1 {
|
|
7562
|
+
getValue () {
|
|
7563
|
+
return this.expressions[ this.expressions.length - 1 ].getValue();
|
|
7564
|
+
}
|
|
7565
|
+
|
|
7566
|
+
hasEffects ( options ) {
|
|
7567
|
+
return this.expressions.some( expression => expression.hasEffects( options ) );
|
|
7568
|
+
}
|
|
7569
|
+
|
|
7570
|
+
includeInBundle () {
|
|
7571
|
+
if ( this.isFullyIncluded() ) { return false; }
|
|
7572
|
+
let addedNewNodes = false;
|
|
7573
|
+
if ( this.expressions[ this.expressions.length - 1 ].includeInBundle() ) {
|
|
7574
|
+
addedNewNodes = true;
|
|
7575
|
+
}
|
|
7576
|
+
this.expressions.forEach( node => {
|
|
7577
|
+
if ( node.shouldBeIncluded() ) {
|
|
7578
|
+
if ( node.includeInBundle() ) {
|
|
7579
|
+
addedNewNodes = true;
|
|
7580
|
+
}
|
|
7581
|
+
}
|
|
7582
|
+
} );
|
|
7583
|
+
if ( !this.included || addedNewNodes ) {
|
|
7584
|
+
this.included = true;
|
|
7585
|
+
return true;
|
|
7586
|
+
}
|
|
7587
|
+
return false;
|
|
7588
|
+
}
|
|
7589
|
+
|
|
7590
|
+
render ( code, es ) {
|
|
7591
|
+
if ( !this.module.bundle.treeshake ) {
|
|
7592
|
+
super.render( code, es );
|
|
7593
|
+
}
|
|
7594
|
+
|
|
7595
|
+
else {
|
|
7596
|
+
const last = this.expressions[ this.expressions.length - 1 ];
|
|
7597
|
+
const included = this.expressions.slice( 0, this.expressions.length - 1 ).filter( expression => expression.included );
|
|
7598
|
+
|
|
7599
|
+
if ( included.length === 0 ) {
|
|
7600
|
+
code.remove( this.start, last.start );
|
|
7601
|
+
code.remove( last.end, this.end );
|
|
7602
|
+
}
|
|
7603
|
+
|
|
7604
|
+
else {
|
|
7605
|
+
let previousEnd = this.start;
|
|
7606
|
+
for ( const expression of included ) {
|
|
7607
|
+
code.remove( previousEnd, expression.start );
|
|
7608
|
+
code.appendLeft( expression.end, ', ' );
|
|
7609
|
+
previousEnd = expression.end;
|
|
7610
|
+
}
|
|
7611
|
+
|
|
7612
|
+
code.remove( previousEnd, last.start );
|
|
7613
|
+
code.remove( last.end, this.end );
|
|
7614
|
+
}
|
|
7615
|
+
}
|
|
7616
|
+
}
|
|
7617
|
+
}
|
|
7618
|
+
|
|
7558
7619
|
class SwitchCase extends Node$1 {
|
|
7559
7620
|
includeInBundle () {
|
|
7560
7621
|
if ( this.isFullyIncluded() ) { return false; }
|
|
@@ -7960,6 +8021,7 @@ var nodes = {
|
|
|
7960
8021
|
Property,
|
|
7961
8022
|
RestElement,
|
|
7962
8023
|
ReturnStatement,
|
|
8024
|
+
SequenceExpression,
|
|
7963
8025
|
SwitchCase,
|
|
7964
8026
|
SwitchStatement,
|
|
7965
8027
|
TaggedTemplateExpression,
|
|
@@ -8625,7 +8687,7 @@ class ExternalVariable extends Variable {
|
|
|
8625
8687
|
return es ? this.safeName : `${this.module.name}.${this.name}`;
|
|
8626
8688
|
}
|
|
8627
8689
|
|
|
8628
|
-
|
|
8690
|
+
includeVariable () {
|
|
8629
8691
|
if ( this.included ) {
|
|
8630
8692
|
return false;
|
|
8631
8693
|
}
|
|
@@ -10615,7 +10677,7 @@ function rollup ( options ) {
|
|
|
10615
10677
|
}
|
|
10616
10678
|
}
|
|
10617
10679
|
|
|
10618
|
-
var version$1 = "0.50.
|
|
10680
|
+
var version$1 = "0.50.1";
|
|
10619
10681
|
|
|
10620
10682
|
exports.rollup = rollup;
|
|
10621
10683
|
exports.VERSION = version$1;
|
package/dist/rollup.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rollup.js v0.50.
|
|
3
|
-
|
|
2
|
+
Rollup.js v0.50.1
|
|
3
|
+
Wed Nov 08 2017 06:27:53 GMT+0100 (CET) - commit e773b589d9a05ba3d51ad44d3016ee6dfa2d2fd5
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
@@ -6547,6 +6547,15 @@ class ConditionalExpression extends Node$1 {
|
|
|
6547
6547
|
return testValue ? this.consequent.getValue() : this.alternate.getValue();
|
|
6548
6548
|
}
|
|
6549
6549
|
|
|
6550
|
+
hasEffects ( options ) {
|
|
6551
|
+
return (
|
|
6552
|
+
this.included
|
|
6553
|
+
|| this.test.hasEffects( options )
|
|
6554
|
+
|| (this.testValue === UNKNOWN_VALUE && (this.consequent.hasEffects( options ) || this.alternate.hasEffects( options )))
|
|
6555
|
+
|| (this.testValue ? this.consequent.hasEffects( options ) : this.alternate.hasEffects( options ))
|
|
6556
|
+
);
|
|
6557
|
+
}
|
|
6558
|
+
|
|
6550
6559
|
render ( code, es ) {
|
|
6551
6560
|
if ( !this.module.bundle.treeshake ) {
|
|
6552
6561
|
super.render( code, es );
|
|
@@ -6557,22 +6566,16 @@ class ConditionalExpression extends Node$1 {
|
|
|
6557
6566
|
super.render( code, es );
|
|
6558
6567
|
}
|
|
6559
6568
|
|
|
6560
|
-
else
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
} else {
|
|
6569
|
-
code.remove( this.start, this.alternate.start );
|
|
6570
|
-
code.remove( this.alternate.end, this.end );
|
|
6571
|
-
if ( this.alternate.type === 'SequenceExpression' ) {
|
|
6572
|
-
code.prependRight( this.alternate.start, '(' );
|
|
6573
|
-
code.appendLeft( this.alternate.end, ')' );
|
|
6569
|
+
else {
|
|
6570
|
+
const branchToRetain = this.testValue ? this.consequent : this.alternate;
|
|
6571
|
+
|
|
6572
|
+
code.remove( this.start, branchToRetain.start );
|
|
6573
|
+
code.remove( branchToRetain.end, this.end );
|
|
6574
|
+
if ( branchToRetain.type === 'SequenceExpression' ) {
|
|
6575
|
+
code.prependLeft( branchToRetain.start, '(' );
|
|
6576
|
+
code.appendRight( branchToRetain.end, ')' );
|
|
6574
6577
|
}
|
|
6575
|
-
|
|
6578
|
+
branchToRetain.render( code, es );
|
|
6576
6579
|
}
|
|
6577
6580
|
}
|
|
6578
6581
|
}
|
|
@@ -7507,6 +7510,64 @@ class ReturnStatement extends Statement {
|
|
|
7507
7510
|
}
|
|
7508
7511
|
}
|
|
7509
7512
|
|
|
7513
|
+
class SequenceExpression extends Node$1 {
|
|
7514
|
+
getValue () {
|
|
7515
|
+
return this.expressions[ this.expressions.length - 1 ].getValue();
|
|
7516
|
+
}
|
|
7517
|
+
|
|
7518
|
+
hasEffects ( options ) {
|
|
7519
|
+
return this.expressions.some( expression => expression.hasEffects( options ) );
|
|
7520
|
+
}
|
|
7521
|
+
|
|
7522
|
+
includeInBundle () {
|
|
7523
|
+
if ( this.isFullyIncluded() ) { return false; }
|
|
7524
|
+
let addedNewNodes = false;
|
|
7525
|
+
if ( this.expressions[ this.expressions.length - 1 ].includeInBundle() ) {
|
|
7526
|
+
addedNewNodes = true;
|
|
7527
|
+
}
|
|
7528
|
+
this.expressions.forEach( node => {
|
|
7529
|
+
if ( node.shouldBeIncluded() ) {
|
|
7530
|
+
if ( node.includeInBundle() ) {
|
|
7531
|
+
addedNewNodes = true;
|
|
7532
|
+
}
|
|
7533
|
+
}
|
|
7534
|
+
} );
|
|
7535
|
+
if ( !this.included || addedNewNodes ) {
|
|
7536
|
+
this.included = true;
|
|
7537
|
+
return true;
|
|
7538
|
+
}
|
|
7539
|
+
return false;
|
|
7540
|
+
}
|
|
7541
|
+
|
|
7542
|
+
render ( code, es ) {
|
|
7543
|
+
if ( !this.module.bundle.treeshake ) {
|
|
7544
|
+
super.render( code, es );
|
|
7545
|
+
}
|
|
7546
|
+
|
|
7547
|
+
else {
|
|
7548
|
+
const last = this.expressions[ this.expressions.length - 1 ];
|
|
7549
|
+
const included = this.expressions.slice( 0, this.expressions.length - 1 ).filter( expression => expression.included );
|
|
7550
|
+
|
|
7551
|
+
if ( included.length === 0 ) {
|
|
7552
|
+
code.remove( this.start, last.start );
|
|
7553
|
+
code.remove( last.end, this.end );
|
|
7554
|
+
}
|
|
7555
|
+
|
|
7556
|
+
else {
|
|
7557
|
+
let previousEnd = this.start;
|
|
7558
|
+
for ( const expression of included ) {
|
|
7559
|
+
code.remove( previousEnd, expression.start );
|
|
7560
|
+
code.appendLeft( expression.end, ', ' );
|
|
7561
|
+
previousEnd = expression.end;
|
|
7562
|
+
}
|
|
7563
|
+
|
|
7564
|
+
code.remove( previousEnd, last.start );
|
|
7565
|
+
code.remove( last.end, this.end );
|
|
7566
|
+
}
|
|
7567
|
+
}
|
|
7568
|
+
}
|
|
7569
|
+
}
|
|
7570
|
+
|
|
7510
7571
|
class SwitchCase extends Node$1 {
|
|
7511
7572
|
includeInBundle () {
|
|
7512
7573
|
if ( this.isFullyIncluded() ) { return false; }
|
|
@@ -7912,6 +7973,7 @@ var nodes = {
|
|
|
7912
7973
|
Property,
|
|
7913
7974
|
RestElement,
|
|
7914
7975
|
ReturnStatement,
|
|
7976
|
+
SequenceExpression,
|
|
7915
7977
|
SwitchCase,
|
|
7916
7978
|
SwitchStatement,
|
|
7917
7979
|
TaggedTemplateExpression,
|
|
@@ -8577,7 +8639,7 @@ class ExternalVariable extends Variable {
|
|
|
8577
8639
|
return es ? this.safeName : `${this.module.name}.${this.name}`;
|
|
8578
8640
|
}
|
|
8579
8641
|
|
|
8580
|
-
|
|
8642
|
+
includeVariable () {
|
|
8581
8643
|
if ( this.included ) {
|
|
8582
8644
|
return false;
|
|
8583
8645
|
}
|
|
@@ -14423,7 +14485,7 @@ function watch$1(configs) {
|
|
|
14423
14485
|
return new Watcher(configs);
|
|
14424
14486
|
}
|
|
14425
14487
|
|
|
14426
|
-
var version$1 = "0.50.
|
|
14488
|
+
var version$1 = "0.50.1";
|
|
14427
14489
|
|
|
14428
14490
|
export { rollup, watch$1 as watch, version$1 as VERSION };
|
|
14429
14491
|
//# sourceMappingURL=rollup.es.js.map
|
package/dist/rollup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rollup.js v0.50.
|
|
3
|
-
|
|
2
|
+
Rollup.js v0.50.1
|
|
3
|
+
Wed Nov 08 2017 06:27:53 GMT+0100 (CET) - commit e773b589d9a05ba3d51ad44d3016ee6dfa2d2fd5
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
@@ -6554,6 +6554,15 @@ class ConditionalExpression extends Node$1 {
|
|
|
6554
6554
|
return testValue ? this.consequent.getValue() : this.alternate.getValue();
|
|
6555
6555
|
}
|
|
6556
6556
|
|
|
6557
|
+
hasEffects ( options ) {
|
|
6558
|
+
return (
|
|
6559
|
+
this.included
|
|
6560
|
+
|| this.test.hasEffects( options )
|
|
6561
|
+
|| (this.testValue === UNKNOWN_VALUE && (this.consequent.hasEffects( options ) || this.alternate.hasEffects( options )))
|
|
6562
|
+
|| (this.testValue ? this.consequent.hasEffects( options ) : this.alternate.hasEffects( options ))
|
|
6563
|
+
);
|
|
6564
|
+
}
|
|
6565
|
+
|
|
6557
6566
|
render ( code, es ) {
|
|
6558
6567
|
if ( !this.module.bundle.treeshake ) {
|
|
6559
6568
|
super.render( code, es );
|
|
@@ -6564,22 +6573,16 @@ class ConditionalExpression extends Node$1 {
|
|
|
6564
6573
|
super.render( code, es );
|
|
6565
6574
|
}
|
|
6566
6575
|
|
|
6567
|
-
else
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
} else {
|
|
6576
|
-
code.remove( this.start, this.alternate.start );
|
|
6577
|
-
code.remove( this.alternate.end, this.end );
|
|
6578
|
-
if ( this.alternate.type === 'SequenceExpression' ) {
|
|
6579
|
-
code.prependRight( this.alternate.start, '(' );
|
|
6580
|
-
code.appendLeft( this.alternate.end, ')' );
|
|
6576
|
+
else {
|
|
6577
|
+
const branchToRetain = this.testValue ? this.consequent : this.alternate;
|
|
6578
|
+
|
|
6579
|
+
code.remove( this.start, branchToRetain.start );
|
|
6580
|
+
code.remove( branchToRetain.end, this.end );
|
|
6581
|
+
if ( branchToRetain.type === 'SequenceExpression' ) {
|
|
6582
|
+
code.prependLeft( branchToRetain.start, '(' );
|
|
6583
|
+
code.appendRight( branchToRetain.end, ')' );
|
|
6581
6584
|
}
|
|
6582
|
-
|
|
6585
|
+
branchToRetain.render( code, es );
|
|
6583
6586
|
}
|
|
6584
6587
|
}
|
|
6585
6588
|
}
|
|
@@ -7514,6 +7517,64 @@ class ReturnStatement extends Statement {
|
|
|
7514
7517
|
}
|
|
7515
7518
|
}
|
|
7516
7519
|
|
|
7520
|
+
class SequenceExpression extends Node$1 {
|
|
7521
|
+
getValue () {
|
|
7522
|
+
return this.expressions[ this.expressions.length - 1 ].getValue();
|
|
7523
|
+
}
|
|
7524
|
+
|
|
7525
|
+
hasEffects ( options ) {
|
|
7526
|
+
return this.expressions.some( expression => expression.hasEffects( options ) );
|
|
7527
|
+
}
|
|
7528
|
+
|
|
7529
|
+
includeInBundle () {
|
|
7530
|
+
if ( this.isFullyIncluded() ) { return false; }
|
|
7531
|
+
let addedNewNodes = false;
|
|
7532
|
+
if ( this.expressions[ this.expressions.length - 1 ].includeInBundle() ) {
|
|
7533
|
+
addedNewNodes = true;
|
|
7534
|
+
}
|
|
7535
|
+
this.expressions.forEach( node => {
|
|
7536
|
+
if ( node.shouldBeIncluded() ) {
|
|
7537
|
+
if ( node.includeInBundle() ) {
|
|
7538
|
+
addedNewNodes = true;
|
|
7539
|
+
}
|
|
7540
|
+
}
|
|
7541
|
+
} );
|
|
7542
|
+
if ( !this.included || addedNewNodes ) {
|
|
7543
|
+
this.included = true;
|
|
7544
|
+
return true;
|
|
7545
|
+
}
|
|
7546
|
+
return false;
|
|
7547
|
+
}
|
|
7548
|
+
|
|
7549
|
+
render ( code, es ) {
|
|
7550
|
+
if ( !this.module.bundle.treeshake ) {
|
|
7551
|
+
super.render( code, es );
|
|
7552
|
+
}
|
|
7553
|
+
|
|
7554
|
+
else {
|
|
7555
|
+
const last = this.expressions[ this.expressions.length - 1 ];
|
|
7556
|
+
const included = this.expressions.slice( 0, this.expressions.length - 1 ).filter( expression => expression.included );
|
|
7557
|
+
|
|
7558
|
+
if ( included.length === 0 ) {
|
|
7559
|
+
code.remove( this.start, last.start );
|
|
7560
|
+
code.remove( last.end, this.end );
|
|
7561
|
+
}
|
|
7562
|
+
|
|
7563
|
+
else {
|
|
7564
|
+
let previousEnd = this.start;
|
|
7565
|
+
for ( const expression of included ) {
|
|
7566
|
+
code.remove( previousEnd, expression.start );
|
|
7567
|
+
code.appendLeft( expression.end, ', ' );
|
|
7568
|
+
previousEnd = expression.end;
|
|
7569
|
+
}
|
|
7570
|
+
|
|
7571
|
+
code.remove( previousEnd, last.start );
|
|
7572
|
+
code.remove( last.end, this.end );
|
|
7573
|
+
}
|
|
7574
|
+
}
|
|
7575
|
+
}
|
|
7576
|
+
}
|
|
7577
|
+
|
|
7517
7578
|
class SwitchCase extends Node$1 {
|
|
7518
7579
|
includeInBundle () {
|
|
7519
7580
|
if ( this.isFullyIncluded() ) { return false; }
|
|
@@ -7919,6 +7980,7 @@ var nodes = {
|
|
|
7919
7980
|
Property,
|
|
7920
7981
|
RestElement,
|
|
7921
7982
|
ReturnStatement,
|
|
7983
|
+
SequenceExpression,
|
|
7922
7984
|
SwitchCase,
|
|
7923
7985
|
SwitchStatement,
|
|
7924
7986
|
TaggedTemplateExpression,
|
|
@@ -8584,7 +8646,7 @@ class ExternalVariable extends Variable {
|
|
|
8584
8646
|
return es ? this.safeName : `${this.module.name}.${this.name}`;
|
|
8585
8647
|
}
|
|
8586
8648
|
|
|
8587
|
-
|
|
8649
|
+
includeVariable () {
|
|
8588
8650
|
if ( this.included ) {
|
|
8589
8651
|
return false;
|
|
8590
8652
|
}
|
|
@@ -14430,7 +14492,7 @@ function watch$1(configs) {
|
|
|
14430
14492
|
return new Watcher(configs);
|
|
14431
14493
|
}
|
|
14432
14494
|
|
|
14433
|
-
var version$1 = "0.50.
|
|
14495
|
+
var version$1 = "0.50.1";
|
|
14434
14496
|
|
|
14435
14497
|
exports.rollup = rollup;
|
|
14436
14498
|
exports.watch = watch$1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.1",
|
|
4
4
|
"description": "Next-generation ES6 module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/rollup.es.js",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"pretest": "npm run build",
|
|
13
|
-
"test": "
|
|
13
|
+
"test": "npm run test:only",
|
|
14
|
+
"test:only": "mocha",
|
|
14
15
|
"test:leak": "node --expose-gc test/leak/index.js",
|
|
15
16
|
"test:quick": "rollup -c && mocha",
|
|
16
17
|
"pretest-coverage": "npm run build",
|
|
@@ -19,7 +20,8 @@
|
|
|
19
20
|
"ci": "npm run test-coverage && codecov < coverage/coverage-remapped.lcov",
|
|
20
21
|
"build": "git rev-parse HEAD > .commithash && rollup -c && chmod a+x bin/rollup",
|
|
21
22
|
"watch": "rollup -cw",
|
|
22
|
-
"
|
|
23
|
+
"prepublishOnly": "npm run lint && npm run test:only && npm run test:leak",
|
|
24
|
+
"prepare": "npm run build",
|
|
23
25
|
"lint": "eslint src browser test/test.js test/*/index.js test/utils test/**/_config.js"
|
|
24
26
|
},
|
|
25
27
|
"repository": "rollup/rollup",
|