2018-06-04 21:25:19 +00:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
const path = require("path");
|
2018-07-03 12:40:58 +00:00
|
|
|
const tsNode = require("ts-node");
|
|
|
|
const defaultTsNodeOptions = {
|
2018-06-04 21:25:19 +00:00
|
|
|
compilerOptions: {
|
2018-07-03 12:40:58 +00:00
|
|
|
lib: ['es2016', 'es2017'],
|
|
|
|
target: 'es2015',
|
2018-06-30 16:43:16 +00:00
|
|
|
},
|
2018-07-01 15:30:05 +00:00
|
|
|
skipIgnore: true,
|
2018-07-01 09:32:08 +00:00
|
|
|
cacheDirectory: path.join(__dirname, '../tscache')
|
2018-07-03 12:40:58 +00:00
|
|
|
};
|
|
|
|
if (process.argv.includes('--nocache')) {
|
|
|
|
defaultTsNodeOptions.cache = false;
|
|
|
|
}
|
|
|
|
tsNode.register(defaultTsNodeOptions);
|
2018-06-30 15:59:15 +00:00
|
|
|
if (process.env.CLI_CALL_TSRUN) {
|
2018-06-25 08:23:15 +00:00
|
|
|
// contents of argv array
|
|
|
|
// process.argv[0] -> node Executable
|
|
|
|
// process.argv[1] -> tsrun executable
|
|
|
|
const pathToTsFile = process.argv[2];
|
|
|
|
const pathToLoad = path.join(process.cwd(), pathToTsFile);
|
2018-06-05 21:40:59 +00:00
|
|
|
Promise.resolve().then(() => require(pathToLoad));
|
|
|
|
}
|
2018-07-03 12:40:58 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDZCQUE2QjtBQUM3QixrQ0FBa0M7QUFFbEMsTUFBTSxvQkFBb0IsR0FBbUI7SUFDM0MsZUFBZSxFQUFFO1FBQ2YsR0FBRyxFQUFFLENBQUMsUUFBUSxFQUFDLFFBQVEsQ0F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