I would like to execute a command from inside a typescript file.
- The typescript file doesn't have to continue, ideally it would end.
- The command and all its output would be output to screen, as if it was run from command prompt.
I have tried this without success
var exec = require('child_process').exec
exec('npm run start', (err, stdout, stderr) =>console.log(stdout));