@apitree.cz/ts-config 0.4.9 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Suitable for monorepo root.
|
|
|
31
31
|
```json
|
|
32
32
|
{
|
|
33
33
|
"extends": "@apitree.cz/ts-config",
|
|
34
|
-
"include": ["./*.js", "./*.ts"],
|
|
34
|
+
"include": ["./*.js", "./*.ts", "./packages/*/*.config.js", "./packages/*/*.config.ts"],
|
|
35
35
|
"exclude": ["node_modules"]
|
|
36
36
|
}
|
|
37
37
|
```
|
|
@@ -61,40 +61,30 @@ Suitable for distributable `npm` packages (framework-agnostic).
|
|
|
61
61
|
}
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
####
|
|
64
|
+
#### Configuration in Monorepos
|
|
65
65
|
|
|
66
|
-
In order for
|
|
66
|
+
In order for your IDE and tools to correctly resolve paths for internal libraries in monorepos, separate your configuration into:
|
|
67
67
|
|
|
68
|
-
`tsconfig.
|
|
68
|
+
`tsconfig.json` - Main configuration for type checking:
|
|
69
69
|
|
|
70
70
|
```json
|
|
71
71
|
{
|
|
72
72
|
"extends": "@apitree.cz/ts-config/library",
|
|
73
|
-
"exclude": ["dist", "node_modules"]
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
`tsconfig.json`
|
|
78
|
-
|
|
79
|
-
```json
|
|
80
|
-
{
|
|
81
|
-
"extends": "./tsconfig.lib.json",
|
|
82
73
|
"compilerOptions": {
|
|
83
74
|
"rootDir": "./src",
|
|
84
75
|
"outDir": "./dist"
|
|
85
|
-
}
|
|
76
|
+
},
|
|
77
|
+
"include": ["./src"],
|
|
78
|
+
"exclude": ["dist", "node_modules"]
|
|
86
79
|
}
|
|
87
80
|
```
|
|
88
81
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
`tsconfig.build.json`
|
|
82
|
+
`tsconfig.build.json` - Build configuration (inherits from tsconfig.json):
|
|
92
83
|
|
|
93
84
|
```json
|
|
94
85
|
{
|
|
95
86
|
"extends": "./tsconfig.json",
|
|
96
|
-
"compilerOptions": { "noEmit": false }
|
|
97
|
-
"include": ["./src"]
|
|
87
|
+
"compilerOptions": { "noEmit": false }
|
|
98
88
|
}
|
|
99
89
|
```
|
|
100
90
|
|
|
@@ -102,15 +92,15 @@ If your package also contains other non-src directories (e.g. `tests`, `scripts`
|
|
|
102
92
|
|
|
103
93
|
```json
|
|
104
94
|
{
|
|
105
|
-
"extends": "../tsconfig.
|
|
95
|
+
"extends": "../tsconfig.json",
|
|
106
96
|
"compilerOptions": {
|
|
107
97
|
"rootDir": ".."
|
|
108
98
|
},
|
|
109
|
-
"include": ["
|
|
99
|
+
"include": [".."]
|
|
110
100
|
}
|
|
111
101
|
```
|
|
112
102
|
|
|
113
|
-
This is necessary for both
|
|
103
|
+
This is necessary for both your IDE and CLI `typescript-eslint` to correctly type-check and lint all files in your package.
|
|
114
104
|
|
|
115
105
|
### Node.js
|
|
116
106
|
|