@nexim/typescript-config 1.1.0 → 2.0.0
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/CHANGELOG.md +19 -0
- package/README.md +48 -11
- package/package.json +7 -4
- package/{tsconfig.json → tsconfig.base.json} +0 -1
- package/tsconfig.browser.app.json +6 -0
- package/tsconfig.browser.lib.json +7 -0
- package/tsconfig.node.app.json +7 -0
- package/tsconfig.node.lib.json +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.0](https://github.com/the-nexim/nanolib/compare/@nexim/typescript-config@1.1.0...@nexim/typescript-config@2.0.0) (2025-01-06)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* **typescript-config:** rename `tsconfig.json` to `tsconfig.base.json`
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **typescript-config:** add new tsconfig environment ([536a173](https://github.com/the-nexim/nanolib/commit/536a17360081edf2b02d363e90fd9dc903d7306c)) by @njfamirm
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **typescript-config:** remove root/out directory ([f0e6c9f](https://github.com/the-nexim/nanolib/commit/f0e6c9fa9dd31ec55df5cafb5b56d0209040225a)) by @njfamirm
|
|
19
|
+
* **typescript-config:** set typescript as peer dependency ([0c09cb2](https://github.com/the-nexim/nanolib/commit/0c09cb2593ac594593f8994449764cf22cd47879)) by @njfamirm
|
|
20
|
+
|
|
21
|
+
### Code Refactoring
|
|
22
|
+
|
|
23
|
+
* **typescript-config:** rename `tsconfig.json` to `tsconfig.base.json` ([341ac77](https://github.com/the-nexim/nanolib/commit/341ac7718ff44f4f69f4f98bac906e7a86aed0cf)) by @arashagp
|
|
24
|
+
|
|
6
25
|
## [1.1.0](https://github.com/the-nexim/nanolib/compare/@nexim/typescript-config@1.0.1...@nexim/typescript-config@1.1.0) (2025-01-05)
|
|
7
26
|
|
|
8
27
|
### Features
|
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# Nexim TypeScript
|
|
1
|
+
# Nexim TypeScript Configuration
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
5
5
|

|
|
6
6
|

|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
This package provides pre-configured settings for using TypeScript in Nexim projects.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Installation
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Install the package as a development dependency:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
yarn add -D @nexim/typescript-config
|
|
@@ -17,15 +17,52 @@ yarn add -D @nexim/typescript-config
|
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
To use this configuration, create a `tsconfig.json` file in the root of your project and extend one of the provided configurations:
|
|
21
|
+
|
|
22
|
+
### Base Configuration (`tsconfig.base.json`)
|
|
23
|
+
|
|
24
|
+
This configuration contains the fundamental settings shared by all other configurations. It's generally not used directly, but serves as the foundation for other, more specific configurations.
|
|
25
|
+
|
|
26
|
+
### Browser Application (`tsconfig.browser.app.json`)
|
|
27
|
+
|
|
28
|
+
Use this configuration for browser-based applications. It extends the base configuration and is primarily used for type checking during development. It doesn't produce build outputs.
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"extends": "@nexim/typescript-config/tsconfig.browser.app.json",
|
|
33
|
+
"include": ["src/**/*.ts", "src/*.ts"] // Include all TypeScript files in your source directory
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Browser Library (`tsconfig.browser.lib.json`)
|
|
38
|
+
|
|
39
|
+
Use this configuration for browser-based libraries. extends the base configuration, generates declaration files (\*.d.ts), and supports referencing other projects.
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"extends": "@nexim/typescript-config/tsconfig.browser.lib.json",
|
|
44
|
+
"include": ["src/**/*.ts", "src/*.ts"] // Include all TypeScript files in your source directory
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Node.js Application (`tsconfig.node.app.json`)
|
|
49
|
+
|
|
50
|
+
Use this configuration for nodejs-based applications. It extends the base configuration and includes Node.js specific type definitions. It doesn't produce build outputs and primarily used for type checking during development.
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"extends": "@nexim/typescript-config/tsconfig.node.app.json",
|
|
55
|
+
"include": ["src/**/*.ts", "src/*.ts"] // Include all TypeScript files in your source directory
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Node.js Library (`tsconfig.node.lib.json`)
|
|
60
|
+
|
|
61
|
+
Use this configuration for nodejs-based libraries. extends the base configuration, incorporates Node.js type definitions, generates declaration files (\*.d.ts), and supports referencing other projects.
|
|
21
62
|
|
|
22
63
|
```json
|
|
23
64
|
{
|
|
24
|
-
"extends": "@nexim/typescript-config",
|
|
25
|
-
"
|
|
26
|
-
"rootDir": "src",
|
|
27
|
-
"outDir": "dist"
|
|
28
|
-
},
|
|
29
|
-
"include": ["src/**/*.ts"]
|
|
65
|
+
"extends": "@nexim/typescript-config/tsconfig.node.lib.json",
|
|
66
|
+
"include": ["src/**/*.ts", "src/*.ts"] // Include all TypeScript files in your source directory
|
|
30
67
|
}
|
|
31
68
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexim/typescript-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Base TypeScript configuration for Nexim projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -23,14 +23,17 @@
|
|
|
23
23
|
"contributors": [
|
|
24
24
|
"Arash Ghardashpoor <arash.qardashpoor@gmail.com> (https://www.agpagp.ir)"
|
|
25
25
|
],
|
|
26
|
-
"
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"typescript": "^5"
|
|
28
|
+
},
|
|
29
|
+
"main": "tsconfig.base.json",
|
|
27
30
|
"files": [
|
|
28
31
|
"**/*.{js,mjs,cjs,map,d.ts,html,md,LEGAL.txt}",
|
|
29
|
-
"tsconfig
|
|
32
|
+
"tsconfig*.json",
|
|
30
33
|
"LICENSE"
|
|
31
34
|
],
|
|
32
35
|
"publishConfig": {
|
|
33
36
|
"access": "public"
|
|
34
37
|
},
|
|
35
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "8d72218409e5b93b27b5026d9cea8f0bf0b1414a"
|
|
36
39
|
}
|