UNPKG

1.79 kBMarkdownView Raw
1rollup version <%= version %>
2=====================================
3
4Usage: rollup [options] <entry file>
5
6Basic options:
7
8-v, --version Show version number
9-h, --help Show this help message
10-c, --config Use this config file (if argument is used but value
11 is unspecified, defaults to rollup.config.js)
12-i, --input Input (alternative to <entry file>)
13-o, --output <output> Output (if absent, prints to stdout)
14-f, --format [es6] Type of output (amd, cjs, es6, iife, umd)
15-e, --external Comma-separate list of module IDs to exclude
16-g, --globals Comma-separate list of `module ID:Global` pairs
17 Any module IDs defined here are added to external
18-n, --name Name for UMD export
19-u, --id ID for AMD module (default is anonymous)
20-m, --sourcemap Generate sourcemap (`-m inline` for inline map)
21--no-strict Don't emit a `"use strict";` in the generated modules.
22--no-indent Don't indent result
23--environment <values> Settings passed to config file (see example)
24
25Examples:
26
27# use settings in config file
28rollup -c
29
30# in config file, process.env.INCLUDE_DEPS === 'true'
31# and process.env.BUILD === 'production'
32rollup -c --environment INCLUDE_DEPS,BUILD:production
33
34# create CommonJS bundle.js from src/main.js
35rollup --format=cjs --output=bundle.js -- src/main.js
36
37# create self-executing IIFE using `window.jQuery`
38# and `window._` as external globals
39rollup -f iife --globals jquery:jQuery,lodash:_ \
40 -i src/app.js -o build/app.js -m build/app.js.map
41
42Notes:
43
44* When piping to stdout, only inline sourcemaps are permitted
45
46For more information visit https://github.com/rollup/rollup/wiki