Browse Source

allow external modules to be specified via CLI

contingency-plan
Rich-Harris 10 years ago
parent
commit
ef67ce9148
  1. 1
      bin/help.md
  2. 3
      bin/index.js
  3. 3
      bin/runRollup.js

1
bin/help.md

@ -10,6 +10,7 @@ Basic options:
-i, --input Input (alternative to <entry file>)
-o, --output <output> Output (if absent, prints to stdout)
-f, --format [umd] Type of output (amd, cjs, es6, iife, umd)
-e, --external Comma-separate list of module IDs to exclude
-n, --name Name for UMD export
-u, --id ID for AMD module (default is anonymous)
-m, --sourcemap Generate sourcemap (`-m inline` for inline map)

3
bin/index.js

@ -12,7 +12,8 @@ command = minimist( process.argv.slice( 2 ), {
f: 'format',
m: 'sourcemap',
n: 'name',
u: 'id'
u: 'id',
e: 'external'
}
});

3
bin/runRollup.js

@ -34,7 +34,8 @@ function bundle ( options, method ) {
}
return rollup.rollup({
entry: options.input
entry: options.input,
external: options.external && options.external.split( ',' )
}).then( function ( bundle ) {
var generateOptions = {
dest: options.output,

Loading…
Cancel
Save