tsrun/ts/index.ts

12 lines
229 B
TypeScript
Raw Permalink Normal View History

2018-06-04 21:25:19 +00:00
import * as tsNode from 'ts-node';
import * as path from 'path';
tsNode.register({
compilerOptions: {
lib: ['es2016', 'es2017']
}
});
const pathToLoad = path.join(process.cwd(), process.argv.pop());
import(pathToLoad);