rollup 0.41.5 → 0.41.6
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/CHANGELOG.md +4 -0
- package/README.md +31 -6
- package/bin/rollup +1 -1
- package/dist/rollup.browser.js +6 -5
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.es.js +6 -5
- package/dist/rollup.es.js.map +1 -1
- package/dist/rollup.js +6 -5
- package/dist/rollup.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# rollup changelog
|
|
2
2
|
|
|
3
|
+
## 0.41.6
|
|
4
|
+
|
|
5
|
+
* Preserve `originalSourceMap` on incremental rebuilds for loaders with sourcemaps ([#1336](https://github.com/rollup/rollup/issues/1336))
|
|
6
|
+
|
|
3
7
|
## 0.41.5
|
|
4
8
|
|
|
5
9
|
* Wrap ternary consequent/alternate sequences in parens ([#1273](https://github.com/rollup/rollup/issues/1273))
|
package/README.md
CHANGED
|
@@ -32,12 +32,32 @@ 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://github.com/rollup/rollup/wiki/Command-Line-Interface) with an optional configuration file, or else through its [JavaScript API](https://github.com/rollup/rollup/wiki/JavaScript-API).
|
|
35
|
+
Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://github.com/rollup/rollup/wiki/Command-Line-Interface) with an optional configuration file, or else through its [JavaScript API](https://github.com/rollup/rollup/wiki/JavaScript-API). Run `rollup --help` to see the available options and parameters. The [starter project template](https://github.com/rollup/rollup-starter-project) demonstrates common configuration options, and more detailed instructions are available throughout the [user guide](http://rollupjs.org/guide/).
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
### Commands
|
|
38
|
+
|
|
39
|
+
These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js.
|
|
40
|
+
|
|
41
|
+
For browsers:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# compile to a <script> containing a self-executing function
|
|
45
|
+
$ rollup main.js --format iife --output bundle.js
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For Node.js:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# compile to a CommonJS module
|
|
52
|
+
$ rollup main.js --format cjs --output bundle.js
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
For both browsers and Node.js:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# UMD format requires a bundle name
|
|
59
|
+
$ rollup main.js --format umd --name "myBundle" --output bundle.js
|
|
60
|
+
```
|
|
41
61
|
|
|
42
62
|
## Why
|
|
43
63
|
|
|
@@ -83,6 +103,11 @@ Rollup can import existing CommonJS modules [through a plugin](https://github.co
|
|
|
83
103
|
|
|
84
104
|
To make sure your ES6 modules are immediately usable by tools that work with CommonJS such as Node.js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the `main` property in your `package.json` file. If your `package.json` file also has a `module` field, ES6-aware tools like Rollup and [webpack 2](https://webpack.js.org/) will [import the ES6 module version](https://github.com/rollup/rollup/wiki/pkg.module) directly.
|
|
85
105
|
|
|
106
|
+
## Links
|
|
107
|
+
|
|
108
|
+
- step-by-step [tutorial video series](https://code.lengstorf.com/learn-rollup-js/), with accompanying written walkthrough
|
|
109
|
+
- miscellaneous issues in the [wiki](https://github.com/rollup/rollup/wiki)
|
|
110
|
+
|
|
86
111
|
## License
|
|
87
112
|
|
|
88
|
-
|
|
113
|
+
[MIT](https://github.com/rollup/rollup/blob/master/LICENSE.md)
|
package/bin/rollup
CHANGED
|
@@ -247,7 +247,7 @@ function isNumber (x) {
|
|
|
247
247
|
|
|
248
248
|
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 <output> Output (if absent, prints to stdout)\n-f, --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-u, --id ID for AMD module (default is anonymous)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\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\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";
|
|
249
249
|
|
|
250
|
-
var version = "0.41.
|
|
250
|
+
var version = "0.41.6";
|
|
251
251
|
|
|
252
252
|
var path$1 = path__default;
|
|
253
253
|
var Module = module$1;
|
package/dist/rollup.browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rollup.js v0.41.
|
|
3
|
-
Thu Mar
|
|
2
|
+
Rollup.js v0.41.6
|
|
3
|
+
Thu Mar 16 2017 00:50:36 GMT-0400 (EDT) - commit a96a923d631b9d2c471137542b9c4f578b8faa53
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
@@ -8131,6 +8131,7 @@ Module.prototype.toJSON = function toJSON () {
|
|
|
8131
8131
|
dependencies: this.dependencies.map( function (module) { return module.id; } ),
|
|
8132
8132
|
code: this.code,
|
|
8133
8133
|
originalCode: this.originalCode,
|
|
8134
|
+
originalSourceMap: this.originalSourceMap,
|
|
8134
8135
|
ast: this.astClone,
|
|
8135
8136
|
sourceMapChain: this.sourceMapChain,
|
|
8136
8137
|
resolvedIds: this.resolvedIds
|
|
@@ -8144,8 +8145,8 @@ Module.prototype.trace = function trace ( name ) {
|
|
|
8144
8145
|
}
|
|
8145
8146
|
|
|
8146
8147
|
if ( name in this.imports ) {
|
|
8147
|
-
|
|
8148
|
-
|
|
8148
|
+
var importDeclaration = this.imports[ name ];
|
|
8149
|
+
var otherModule = importDeclaration.module;
|
|
8149
8150
|
|
|
8150
8151
|
if ( importDeclaration.name === '*' && !otherModule.isExternal ) {
|
|
8151
8152
|
return otherModule.namespace();
|
|
@@ -9888,7 +9889,7 @@ Bundle$$1.prototype.warn = function warn ( warning ) {
|
|
|
9888
9889
|
this.onwarn( warning );
|
|
9889
9890
|
};
|
|
9890
9891
|
|
|
9891
|
-
var VERSION = '0.41.
|
|
9892
|
+
var VERSION = '0.41.6';
|
|
9892
9893
|
|
|
9893
9894
|
var ALLOWED_KEYS = [
|
|
9894
9895
|
'acorn',
|