mirror of https://github.com/lukechilds/rollup.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
544 B
31 lines
544 B
#!/usr/bin/env node
|
|
|
|
var minimist = require( 'minimist' ),
|
|
command;
|
|
|
|
command = minimist( process.argv.slice( 2 ), {
|
|
alias: {
|
|
e: 'external',
|
|
f: 'format',
|
|
g: 'globals',
|
|
h: 'help',
|
|
i: 'input',
|
|
m: 'sourcemap',
|
|
n: 'name',
|
|
o: 'output',
|
|
u: 'id',
|
|
v: 'version'
|
|
}
|
|
});
|
|
|
|
if ( command.help || ( process.argv.length <= 2 && process.stdin.isTTY ) ) {
|
|
require( './showHelp' )();
|
|
}
|
|
|
|
else if ( command.version ) {
|
|
console.log( 'rollup version ' + require( '../package.json' ).version );
|
|
}
|
|
|
|
else {
|
|
require( './runRollup' )( command );
|
|
}
|
|
|