| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/1310f/TypeScriptSamples/master/node/index.ts | [Back] [Original] |
/**
* Just running the command line program.
*/
import { ChildProcess, exec } from 'child_process';
const main: Function = (): ChildProcess => {
let command: string = `ts-node ./src/${process.argv[3]}.ts`;
if (process.argv[2] === 'js') {
exec('tsc');
command = `node ./dist/${process.argv[3]}.js`;
}
return exec(command);
};
main();
| Web Proxy Viewer | New URL | Original Page |