Skip to content

Commit 103b455

Browse files
committed
Merge pull request #683 from kenhowardpdx/patch-1
Added notes on exclude property.
2 parents c0d1158 + 8feec52 commit 103b455

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/tsconfig.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# `tsconfig.json`
2-
A unified project format for TypeScript ([see merged PR on Microsoft/TypeScript](https://github.com/Microsoft/TypeScript/pull/1692)). The TypeScript compiler (`1.5` and above) only cares about `compilerOptions` and `files`. We add additional features to this [with the typescript team's approval to extend the file as long as we don't conflict](https://github.com/Microsoft/TypeScript/issues/1955).
2+
A unified project format for TypeScript ([see merged PR on Microsoft/TypeScript](https://github.com/Microsoft/TypeScript/pull/1692)). The TypeScript compiler (`1.5` and above) only cares about `compilerOptions` and `files`. TypeScript `1.6` introduced the `exclude` property. We add additional features to this [with the typescript team's approval to extend the file as long as we don't conflict](https://github.com/Microsoft/TypeScript/issues/1955).
33

44
`tsconfig.json` is great for building the ["compilation context" so you **don't need to use** `/// <reference` comments](http://blog.icanmakethiswork.io/2015/02/hey-tsconfigjson-where-have-you-been.html).
55

@@ -14,6 +14,7 @@ i.e. an empty JSON file at the *root* of your project :heart: This will be suffi
1414

1515
* [`compilerOptions`](https://github.com/TypeStrong/atom-typescript/blob/e2fa67c4715189b71430f766ed9a92d9fb3255f9/lib/main/tsconfig/tsconfig.ts#L8-L35): similar to what you would pass on the commandline to `tsc`.
1616
* One exception : [We don't support `--out` because it will hurt you in the long run, and we will warn you if you use it](https://github.com/TypeStrong/atom-typescript/blob/master/docs/out.md).
17+
* [`exclude`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#exclude): To exclude directories or files from being referenced. This accepts files or folders. This does not accept glob formatting.
1718
* [`filesGlob`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#filesglob): To make it easier for you to just add / remove files in your project we add `filesGlob` which accepts an array of `glob / minimatch / RegExp` patterns (similar to grunt) to specify source files.
1819
* [`formatCodeOptions`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#formatcodeoptions) : Code formatting options
1920
* [`compileOnSave`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#compileonsave) : Should AtomTS compile on save
@@ -23,6 +24,21 @@ i.e. an empty JSON file at the *root* of your project :heart: This will be suffi
2324

2425
## Examples
2526

27+
### exclude
28+
These references are relative to the `tsconfig.json` path. This does not accept glob formatting.
29+
30+
NOTE: `exclude` should not be used when `files` or `filesGlob` are in use. The presence of the `files` property takes presedence over the `exclude` property. [Read about it in the TypeScript wiki](https://github.com/Microsoft/TypeScript/wiki/tsconfig.json#details).
31+
32+
```json
33+
{
34+
"exclude": [
35+
"node_modules",
36+
"bower_components",
37+
"lib/libFileToExclude.d.ts"
38+
]
39+
}
40+
```
41+
2642
### filesGlob
2743

2844
Note: `files` is kept up to date by expansion of `filesGlob`. This is because `files` is standard across all IDEs vs. `filesGlob` is specific to atom-typescript.

0 commit comments

Comments
 (0)