You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tsconfig.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# `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).
3
3
4
4
`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).
5
5
@@ -14,6 +14,7 @@ i.e. an empty JSON file at the *root* of your project :heart: This will be suffi
14
14
15
15
*[`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`.
16
16
* 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.
17
18
*[`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.
*[`compileOnSave`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#compileonsave) : Should AtomTS compile on save
@@ -23,6 +24,25 @@ i.e. an empty JSON file at the *root* of your project :heart: This will be suffi
23
24
24
25
## Examples
25
26
27
+
### exclude
28
+
These references are relative to the `tsconfig.json` path. This does not accept glob formatting.
29
+
30
+
NOTE: `files` can override the `exclude` array. It's recommended to use either `exclude` & `files` -- OR -- `filesGlob`, not both. `filesGlob` solves the exclude problem as long as your team is exclusively using atom-typescript.
31
+
32
+
```json
33
+
{
34
+
"exclude": [
35
+
"node_modules",
36
+
"bower_components",
37
+
"lib/libFileToExclude.d.ts"
38
+
],
39
+
"files": [
40
+
"js/script.ts",
41
+
"typings/tsd.d.ts"
42
+
]
43
+
}
44
+
```
45
+
26
46
### filesGlob
27
47
28
48
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