1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const cli_ux_1 = require("cli-ux");
|
4 | const rootDirs = [];
|
5 | const typeRoots = [`${__dirname}/../node_modules/@types`];
|
6 | function registerTSNode(debug, root) {
|
7 | try {
|
8 | debug('registering ts-node at', root);
|
9 | const tsNode = require('ts-node');
|
10 | typeRoots.push(`${root}/../node_modules/@types`);
|
11 | rootDirs.push(`${root}/src`);
|
12 | tsNode.register({
|
13 | project: false,
|
14 |
|
15 |
|
16 | compilerOptions: {
|
17 | target: 'esnext',
|
18 | module: 'commonjs',
|
19 | rootDirs,
|
20 | typeRoots,
|
21 | }
|
22 | });
|
23 | }
|
24 | catch (err) {
|
25 | cli_ux_1.default.warn(err);
|
26 | }
|
27 | }
|
28 | exports.registerTSNode = registerTSNode;
|