Skip to content

muiltiple dirs ignore by TS_NODE_IGNORE #1805

Answered by cspotcode
pincman asked this question in Q&A
Discussion options

You must be logged in to vote

It's split on commas and then each is interpreted as a regex. You can also see how the default regex is written as an example. Here are references to the source code to show how it is interpreted.

ignore: split(env.TS_NODE_IGNORE),

ts-node/src/util.ts

Lines 47 to 51 in bf13086

export function split(value: string | undefined) {
return typeof value === 'string'
? value.split(/ *, */g).filter((v) => v !== '')
: undefined;
}

ts-node/src/index.ts

Lines 719 to 726 in bf13086

const shouldIgnore = createIgnore(
ignoreBaseDir,
options.skipIgnore
? []
: (options.ignore || [

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cspotcode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants