@yuu1111/tsconfig 1.0.3 → 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 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/bun.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "types": ["bun"]
6
+ }
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./library.json",
4
+ "compilerOptions": {
5
+ "emitDeclarationOnly": true
6
+ }
7
+ }
package/library.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "noEmit": false,
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "sourceMap": true
9
+ }
10
+ }
package/package.json CHANGED
@@ -1,16 +1,19 @@
1
1
  {
2
- "name": "@yuu1111/tsconfig",
3
- "version": "1.0.3",
4
- "description": "Shared TypeScript configurations",
5
- "license": "MIT",
6
- "tsconfig": "./base.json",
7
- "files": [
8
- "base.json",
9
- "react.json"
10
- ],
11
- "keywords": [
12
- "tsconfig",
13
- "typescript",
14
- "config"
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
  }