@yuu1111/tsconfig 1.0.2 → 1.0.4
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 +42 -0
- package/base.json +3 -4
- package/bun.json +7 -0
- package/declaration-only.json +7 -0
- package/library.json +10 -0
- package/package.json +17 -14
package/README.md
CHANGED
|
@@ -20,6 +20,45 @@ Extend one of the presets in your `tsconfig.json`:
|
|
|
20
20
|
}
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
### Bun
|
|
24
|
+
|
|
25
|
+
Install `@types/bun` in the consuming project, then extend the Bun preset:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"extends": "@yuu1111/tsconfig/bun.json"
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Library
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"extends": "@yuu1111/tsconfig/library.json",
|
|
38
|
+
"compilerOptions": {
|
|
39
|
+
"rootDir": "src",
|
|
40
|
+
"outDir": "dist"
|
|
41
|
+
},
|
|
42
|
+
"include": ["src/**/*.ts"]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Declaration-only library
|
|
47
|
+
|
|
48
|
+
Use this preset when a bundler emits JavaScript and TypeScript only needs to emit
|
|
49
|
+
declaration files.
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"extends": "@yuu1111/tsconfig/declaration-only.json",
|
|
54
|
+
"compilerOptions": {
|
|
55
|
+
"rootDir": "src",
|
|
56
|
+
"outDir": "dist"
|
|
57
|
+
},
|
|
58
|
+
"include": ["src/**/*.ts"]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
23
62
|
### React
|
|
24
63
|
|
|
25
64
|
```json
|
|
@@ -36,4 +75,7 @@ Extend one of the presets in your `tsconfig.json`:
|
|
|
36
75
|
| Preset | Use case |
|
|
37
76
|
|--------|----------|
|
|
38
77
|
| `base.json` | Strict shared base |
|
|
78
|
+
| `bun.json` | Bun projects |
|
|
79
|
+
| `declaration-only.json` | Declaration-only library builds |
|
|
80
|
+
| `library.json` | Library builds with declarations and source maps |
|
|
39
81
|
| `react.json` | React (JSX + DOM types) |
|
package/base.json
CHANGED
|
@@ -4,15 +4,14 @@
|
|
|
4
4
|
"strict": true,
|
|
5
5
|
"lib": ["ESNext"],
|
|
6
6
|
"target": "ESNext",
|
|
7
|
-
"module": "
|
|
7
|
+
"module": "Preserve",
|
|
8
|
+
"moduleDetection": "force",
|
|
8
9
|
"moduleResolution": "bundler",
|
|
9
10
|
"esModuleInterop": true,
|
|
11
|
+
"noEmit": true,
|
|
10
12
|
"isolatedModules": true,
|
|
11
13
|
"skipLibCheck": true,
|
|
12
14
|
"resolveJsonModule": true,
|
|
13
|
-
"declaration": true,
|
|
14
|
-
"declarationMap": true,
|
|
15
|
-
"sourceMap": true,
|
|
16
15
|
"forceConsistentCasingInFileNames": true,
|
|
17
16
|
"verbatimModuleSyntax": true,
|
|
18
17
|
"noUncheckedIndexedAccess": true,
|
package/bun.json
ADDED
package/library.json
ADDED
package/package.json
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
"name": "@yuu1111/tsconfig",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Shared TypeScript configurations",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"tsconfig": "./base.json",
|
|
7
|
+
"files": [
|
|
8
|
+
"base.json",
|
|
9
|
+
"bun.json",
|
|
10
|
+
"declaration-only.json",
|
|
11
|
+
"library.json",
|
|
12
|
+
"react.json"
|
|
13
|
+
],
|
|
14
|
+
"keywords": [
|
|
15
|
+
"tsconfig",
|
|
16
|
+
"typescript",
|
|
17
|
+
"config"
|
|
18
|
+
]
|
|
16
19
|
}
|