npmci/ts/mod_command/index.ts

16 lines
418 B
TypeScript
Raw Normal View History

2018-04-04 20:25:13 +00:00
import * as plugins from './mod.plugins';
import { bash } from '../npmci.bash';
2016-06-11 18:22:00 +00:00
2017-03-08 13:50:41 +00:00
export let command = async () => {
2018-04-04 20:25:13 +00:00
let wrappedCommand: string = '';
let argvArray = process.argv;
2017-03-08 13:50:41 +00:00
for (let i = 3; i < argvArray.length; i++) {
2018-04-04 20:25:13 +00:00
wrappedCommand = wrappedCommand + argvArray[i];
if (i + 1 !== argvArray.length) {
wrappedCommand = wrappedCommand + ' ';
}
2017-03-08 13:50:41 +00:00
}
2018-04-04 20:25:13 +00:00
await bash(wrappedCommand);
return;
};