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.
30 lines
511 B
30 lines
511 B
10 years ago
|
#!/usr/bin/env node
|
||
|
|
||
|
var minimist = require( 'minimist' ),
|
||
|
command;
|
||
|
|
||
|
command = minimist( process.argv.slice( 2 ), {
|
||
|
alias: {
|
||
|
i: 'input',
|
||
|
o: 'output',
|
||
|
v: 'version',
|
||
|
h: 'help',
|
||
|
f: 'format',
|
||
|
m: 'sourcemap',
|
||
|
n: 'name',
|
||
|
u: 'id'
|
||
|
}
|
||
|
});
|
||
|
|
||
|
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 );
|
||
|
}
|