2016-05-26 20:17:57 +00:00
|
|
|
#!/usr/bin/env node
|
2016-05-29 20:54:59 +00:00
|
|
|
import "typings-global";
|
|
|
|
import * as plugins from "./npmci.plugins";
|
2016-05-26 20:17:57 +00:00
|
|
|
|
|
|
|
|
2016-05-29 20:54:59 +00:00
|
|
|
|
|
|
|
let command;
|
|
|
|
let commandOption;
|
|
|
|
|
|
|
|
plugins.commander
|
|
|
|
.version('0.0.1')
|
|
|
|
.arguments('<cmd> [node]')
|
|
|
|
.action(function (commandArg, commandOptionArg) {
|
|
|
|
command = commandArg;
|
|
|
|
commandOption = commandOptionArg;
|
|
|
|
});
|
2016-05-26 20:17:57 +00:00
|
|
|
|
2016-05-29 20:54:59 +00:00
|
|
|
plugins.commander.parse(process.argv);
|
2016-05-26 20:17:57 +00:00
|
|
|
|
2016-05-29 20:54:59 +00:00
|
|
|
if (typeof command === 'undefined') {
|
|
|
|
console.error('no command given!');
|
|
|
|
process.exit(1);
|
2016-05-26 20:17:57 +00:00
|
|
|
}
|
2016-05-29 20:54:59 +00:00
|
|
|
|
|
|
|
switch (command){
|
|
|
|
case "install":
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
shelljs.exec("bash -c \"source /usr/local/nvm/nvm.sh && nvm install "+ commandOption + " nvm alias default " + commandOption + "\"");
|