npmci/ts/npmci.command.ts

16 lines
495 B
TypeScript
Raw Normal View History

2016-06-11 18:22:00 +00:00
import "typings-global";
import * as plugins from "./npmci.plugins";
import {bash} from "./npmci.bash";
2016-06-11 18:30:35 +00:00
export let command = () => {
2016-06-11 18:22:00 +00:00
let done = plugins.q.defer()
2016-06-11 19:01:44 +00:00
let wrappedCommand:string = "";
let argvArray = process.argv;
for(let i = 3; i < argvArray.length; i++){
wrappedCommand = wrappedCommand + argvArray[i];
if(i + 1 != argvArray.length) wrappedCommand = wrappedCommand + " ";
2016-06-11 19:01:44 +00:00
}
bash(wrappedCommand);
2016-06-11 18:22:00 +00:00
done.resolve();
return done.promise
}