From 3346db8685b4604589068698ea5e95a6ce50811e Mon Sep 17 00:00:00 2001 From: Thomas Dvornik Date: Fri, 18 Jan 2019 11:16:32 -0800 Subject: [PATCH] feat: disable registering of ts-node (#69) There are some use cases when you would not want oclif to load using ts-node for you, like if you are already running ts-node to run tests or if you want to run off the compiled code. This gives the user the option to disable it if they need to. --- src/ts-node.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ts-node.ts b/src/ts-node.ts index 59ca1aa0..4d1aeb43 100644 --- a/src/ts-node.ts +++ b/src/ts-node.ts @@ -22,6 +22,7 @@ export interface TSConfig { } function registerTSNode(root: string) { + if (process.env.OCLIF_TS_NODE === '0') return if (tsconfigs[root]) return const tsconfig = loadTSConfig(root) if (!tsconfig) return