From 1ee5035af9d8b334cb99d4b9eecccc3951e0c8b6 Mon Sep 17 00:00:00 2001 From: Thomas Dvornik Date: Fri, 18 Jan 2019 11:05:25 -0800 Subject: [PATCH] feat: disable registering of ts-node 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