Microsoft/TypeScript
Vedi su GitHubHow tsconfig exclude pattern should actually work
Open
#12.824 aperta il 10 dic 2016
Help WantedSuggestion
Metriche repository
- Star
- (48.455 star)
- Metriche merge PR
- (Merge medio 6g 17h) (9 PR mergiate in 30 g)
Descrizione
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
Say we have a following structure to specially to test exclude pattern:
/node_modules
/module/some.ts
nested/
/node_modules
/module/some.ts
/deep-nested/
/node_modules
/module/some.ts
Will check this using tsc --listFiles
How exclude patterns work:
- "node_modules" - will exclude only
/node_modules/module/some.ts - "*/node_modules" (the same effect as /node_modules/") - will exclude only
/nested/node_modules/module/some.ts - "**/node_modules" - will exclude nothing
- "**/node_modules/*" - will exclude everything (also nested, deep-nested)
Some behaviour seem strange to me
- why in case 3 it excludes nothing (considering case 2 works)?
- by default (if
excludenot specified) case 1 will be effective, shouldn't it be 4) which excludesnode_modulesin nested folders as well?