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');
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`);