diff --git a/bin/ngw b/bin/ngw index 9d5e696..af651f7 100755 --- a/bin/ngw +++ b/bin/ngw @@ -4,12 +4,13 @@ switch (process.argv[2]) { require('../src/set-up'); break; default: + + const execSync = require('child_process').execSync; + const entryPointPath = require.resolve('../src/index'); + const tsNodePath = require.resolve('../node_modules/ts-node/dist/bin'); + const ngCommandArgs = process.argv.slice(2); + const executionPoint = [tsNodePath, entryPointPath].concat(ngCommandArgs).join(' '); + + execSync(`node ${executionPoint}`, {stdio: 'inherit'}); - var entryPointPath = require.resolve('../src/index'); - var tsNodePath = require.resolve('../node_modules/ts-node/dist/bin'); - - require('child_process').execSync( - [tsNodePath, entryPointPath].concat(process.argv.slice(2)).join(' '), - {stdio: 'inherit'} - ); -} \ No newline at end of file +}