|
|
|
|
|
|
|
|
const spawn = require('child_process').spawn; |
|
|
const spawn = require('child_process').spawn; |
|
|
console.dir(process.argv.slice(2)) |
|
|
console.dir(process.argv.slice(2)) |
|
|
|
|
|
|
|
|
|
|
|
let npmcmd = (process.platform === 'win32' ? 'npm.cmd' : 'npm') |
|
|
|
|
|
let npmrun = (process.platform === 'win32' ? ['run', 'index', '--'] : ['run', 'index_linux', '--']) |
|
|
|
|
|
|
|
|
const child = spawn( |
|
|
const child = spawn( |
|
|
(process.platform === 'win32' ? 'npm.cmd' : 'npm') |
|
|
|
|
|
, ['run', 'index', '--'].concat(process.argv.slice(2)), { env : Object.assign({}, process.env, {wd: process.cwd()}), cwd: __dirname }); |
|
|
|
|
|
|
|
|
npmcmd |
|
|
|
|
|
, npmrun.concat(process.argv.slice(2)), { env : Object.assign({}, process.env, {wd: process.cwd()}), cwd: __dirname }); |
|
|
|
|
|
|
|
|
// const child = spawn( |
|
|
// const child = spawn( |
|
|
// 'C:\\Program Files\\Git\\bin\\sh.exe' |
|
|
// 'C:\\Program Files\\Git\\bin\\sh.exe' |