console.error(chalk.red('Config file must export an options object. See https://github.com/rollup/rollup/wiki/Command-Line-Interface#using-a-config-file'));
},
MISSING_INPUT_OPTION:function(){
console.error(chalk.red('You must specify an --input (-i) option'));
},
MISSING_OUTPUT_OPTION:function(){
console.error(chalk.red('You must specify an --output (-o) option when creating a file with a sourcemap'));
},
MISSING_NAME:function(err){
console.error(chalk.red('You must supply a name for UMD exports (e.g. `--name myModule`)'));
console.error(chalk.red('rollup can only bundle one file at a time'));
},
DUPLICATE_IMPORT_OPTIONS:function(err){
console.error(chalk.red('use --input, or pass input path as argument'));
},
ROLLUP_WATCH_NOT_INSTALLED:function(err){
console.error(chalk.red('rollup --watch depends on the rollup-watch package, which could not be found. You can install it globally (recommended) with ')+chalk.cyan('npm install -g rollup-watch'));
},
WATCHER_MISSING_INPUT_OR_OUTPUT:function(err){
console.error(chalk.red('must specify --input and --output when using rollup --watch'));
}
};
module.exports=functionhandleError(err){
varhandler;
if(handler=handlers[err&&err.code]){
handler(err);
}else{
console.error(chalk.red(err.message||err));
if(err.stack){
console.error(chalk.grey(err.stack));
}
}
console.error('Type '+chalk.cyan('rollup --help')+' for help, or visit https://github.com/rollup/rollup/wiki');
var minimist = (index && typeof index === 'object' && 'default' in index ? index['default'] : index);
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 [es6] Type of output (amd, cjs, es6, 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--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";
var version = "0.29.1";
var index$1 = createCommonjsModule(function (module) {
/*
relative require
*/'use strict';
var path = require$$1__default;
var Module = require$$0;
var modules = {};
var getModule = function(dir) {
var rootPath = dir ? path.resolve(dir) : process.cwd();
var rootName = path.join(rootPath, '@root');
var root = modules[rootName];
if (!root) {
root = new Module(rootName);
root.filename = rootName;
root.paths = Module._nodeModulePaths(rootPath);
modules[rootName] = root;
}
return root;
};
var requireRelative = function(requested, relativeTo) {
stderr$1( red( 'rollup can only bundle one file at a time' ) );
},
DUPLICATE_IMPORT_OPTIONS: function () {
stderr$1( red( 'use --input, or pass input path as argument' ) );
},
ROLLUP_WATCH_NOT_INSTALLED: function () {
stderr$1( red( 'rollup --watch depends on the rollup-watch package, which could not be found. You can install it globally (recommended) with ' ) + cyan( 'npm install -g rollup-watch' ) );
},
WATCHER_MISSING_INPUT_OR_OUTPUT: function () {
stderr$1( red( 'must specify --input and --output when using rollup --watch' ) );
}
};
function handleError ( err ) {
var handler = handlers[ err && err.code ];
if ( handler ) {
handler( err );
} else {
stderr$1( red( err.message || err ) );
if ( err.stack ) {
stderr$1( grey( err.stack ) );
}
}
stderr$1( ("Type " + (cyan( 'rollup --help' )) + " for help, or visit https://github.com/rollup/rollup/wiki") );
process.exit( 1 );
}
var SOURCEMAPPING_URL = 'sourceMa';
SOURCEMAPPING_URL += 'ppingURL';
var SOURCEMAPPING_URL$1 = SOURCEMAPPING_URL;
var rollup = require( '../dist/rollup.js' ); sourceMapSupport.install();
// stderr to stderr to keep `rollup main.js > bundle.js` from breaking
var stderr = console.error.bind( console ); // eslint-disable-line no-console
stderr(chalk.red('rollup can only bundle one file at a time'));
},
DUPLICATE_IMPORT_OPTIONS:()=>{
stderr(chalk.red('use --input, or pass input path as argument'));
},
ROLLUP_WATCH_NOT_INSTALLED:()=>{
stderr(chalk.red('rollup --watch depends on the rollup-watch package, which could not be found. You can install it globally (recommended) with ')+chalk.cyan('npm install -g rollup-watch'));
},
WATCHER_MISSING_INPUT_OR_OUTPUT:()=>{
stderr(chalk.red('must specify --input and --output when using rollup --watch'));
}
};
exportdefaultfunctionhandleError(err){
consthandler=handlers[err&&err.code];
if(handler){
handler(err);
}else{
stderr(chalk.red(err.message||err));
if(err.stack){
stderr(chalk.grey(err.stack));
}
}
stderr(`Type ${chalk.cyan('rollup --help')} for help, or visit https://github.com/rollup/rollup/wiki`);