@igorskyflyer/tsconfig 1.0.1 → 1.0.2
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 +32 -8
- package/package.json +1 -1
- package/tsconfig.base.json +0 -8
package/README.md
CHANGED
|
@@ -60,31 +60,59 @@ Then extend the preferred config in `tsconfig.json`:
|
|
|
60
60
|
**Node (default):**
|
|
61
61
|
```jsonc
|
|
62
62
|
{
|
|
63
|
-
"extends": "@igorskyflyer/tsconfig"
|
|
63
|
+
"extends": "@igorskyflyer/tsconfig",
|
|
64
|
+
"include": ["src/**/*"],
|
|
65
|
+
"exclude": ["node_modules/**/*", "test/**/*", "dist/**/*"],
|
|
66
|
+
"compilerOptions": {
|
|
67
|
+
"rootDir": "./src",
|
|
68
|
+
"outDir": "./dist"
|
|
69
|
+
}
|
|
64
70
|
}
|
|
65
71
|
```
|
|
66
72
|
|
|
67
73
|
**Node (explicit):**
|
|
68
74
|
```jsonc
|
|
69
75
|
{
|
|
70
|
-
"extends": "@igorskyflyer/tsconfig/node"
|
|
76
|
+
"extends": "@igorskyflyer/tsconfig/node",
|
|
77
|
+
"include": ["src/**/*"],
|
|
78
|
+
"exclude": ["node_modules/**/*", "test/**/*", "dist/**/*"],
|
|
79
|
+
"compilerOptions": {
|
|
80
|
+
"rootDir": "./src",
|
|
81
|
+
"outDir": "./dist"
|
|
82
|
+
}
|
|
71
83
|
}
|
|
72
84
|
```
|
|
73
85
|
|
|
74
86
|
**Browser:**
|
|
75
87
|
```jsonc
|
|
76
88
|
{
|
|
77
|
-
"extends": "@igorskyflyer/tsconfig/browser"
|
|
89
|
+
"extends": "@igorskyflyer/tsconfig/browser",
|
|
90
|
+
"include": ["src/**/*"],
|
|
91
|
+
"exclude": ["node_modules/**/*", "test/**/*", "dist/**/*"],
|
|
92
|
+
"compilerOptions": {
|
|
93
|
+
"rootDir": "./src",
|
|
94
|
+
"outDir": "./dist"
|
|
95
|
+
}
|
|
78
96
|
}
|
|
79
97
|
```
|
|
80
98
|
|
|
81
99
|
**Base only:**
|
|
82
100
|
```jsonc
|
|
83
101
|
{
|
|
84
|
-
"extends": "@igorskyflyer/tsconfig/base"
|
|
102
|
+
"extends": "@igorskyflyer/tsconfig/base",
|
|
103
|
+
"include": ["src/**/*"],
|
|
104
|
+
"exclude": ["node_modules/**/*", "test/**/*", "dist/**/*"],
|
|
105
|
+
"compilerOptions": {
|
|
106
|
+
"rootDir": "./src",
|
|
107
|
+
"outDir": "./dist"
|
|
108
|
+
}
|
|
85
109
|
}
|
|
86
110
|
```
|
|
87
111
|
|
|
112
|
+
>[!NOTE]
|
|
113
|
+
> `include`, `exclude`, `rootDir` and `outDir` are project-specific and must be defined locally.
|
|
114
|
+
>
|
|
115
|
+
|
|
88
116
|
<br>
|
|
89
117
|
|
|
90
118
|
## Implementation
|
|
@@ -94,11 +122,7 @@ All configs extend `base`, which defines the shared structure and strict rules.
|
|
|
94
122
|
### Base
|
|
95
123
|
```jsonc
|
|
96
124
|
{
|
|
97
|
-
"include": ["src/**/*"],
|
|
98
|
-
"exclude": ["node_modules/**/*", "test/**/*", "dist/**/*"],
|
|
99
125
|
"compilerOptions": {
|
|
100
|
-
"rootDir": "./src", // source files root
|
|
101
|
-
"outDir": "./dist", // compiled output root
|
|
102
126
|
"declaration": true, // generate .d.ts files
|
|
103
127
|
"declarationMap": true, // generate .d.ts.map files
|
|
104
128
|
"sourceMap": true, // generate .js.map files
|
package/package.json
CHANGED
package/tsconfig.base.json
CHANGED