@nexim/typescript-config 1.1.0 → 2.0.1

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 CHANGED
@@ -3,6 +3,29 @@
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.1](https://github.com/the-nexim/nanolib/compare/@nexim/typescript-config@2.0.0...@nexim/typescript-config@2.0.1) (2025-04-21)
7
+
8
+ **Note:** Version bump only for package @nexim/typescript-config
9
+
10
+ ## [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)
11
+
12
+ ### ⚠ BREAKING CHANGES
13
+
14
+ * **typescript-config:** rename `tsconfig.json` to `tsconfig.base.json`
15
+
16
+ ### Features
17
+
18
+ * **typescript-config:** add new tsconfig environment ([536a173](https://github.com/the-nexim/nanolib/commit/536a17360081edf2b02d363e90fd9dc903d7306c)) by @njfamirm
19
+
20
+ ### Bug Fixes
21
+
22
+ * **typescript-config:** remove root/out directory ([f0e6c9f](https://github.com/the-nexim/nanolib/commit/f0e6c9fa9dd31ec55df5cafb5b56d0209040225a)) by @njfamirm
23
+ * **typescript-config:** set typescript as peer dependency ([0c09cb2](https://github.com/the-nexim/nanolib/commit/0c09cb2593ac594593f8994449764cf22cd47879)) by @njfamirm
24
+
25
+ ### Code Refactoring
26
+
27
+ * **typescript-config:** rename `tsconfig.json` to `tsconfig.base.json` ([341ac77](https://github.com/the-nexim/nanolib/commit/341ac7718ff44f4f69f4f98bac906e7a86aed0cf)) by @arashagp
28
+
6
29
  ## [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
30
 
8
31
  ### Features
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # Nexim TypeScript Config
1
+ # Nexim TypeScript Configuration
2
2
 
3
3
  ![NPM Version](https://img.shields.io/npm/v/@nexim/typescript-config)
4
4
  ![Build & Lint & Test](https://github.com/the-nexim/nanolib/actions/workflows/build-lint-test.yaml/badge.svg)
5
5
  ![NPM Downloads](https://img.shields.io/npm/dm/@nexim/typescript-config)
6
6
  ![NPM License](https://img.shields.io/npm/l/@nexim/typescript-config)
7
7
 
8
- ## Overview
8
+ This package provides pre-configured settings for using TypeScript in Nexim projects.
9
9
 
10
- This is a base TypeScript configuration for Nexim projects.
10
+ ## Installation
11
11
 
12
- ## installation
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
- Create a `tsconfig.json` file in the root of your project:
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
- "compilerOptions": {
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": "1.1.0",
3
+ "version": "2.0.1",
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
- "main": "tsconfig.json",
26
+ "main": "tsconfig.base.json",
27
27
  "files": [
28
28
  "**/*.{js,mjs,cjs,map,d.ts,html,md,LEGAL.txt}",
29
- "tsconfig.json",
29
+ "tsconfig*.json",
30
30
  "LICENSE"
31
31
  ],
32
+ "peerDependencies": {
33
+ "typescript": "^5"
34
+ },
32
35
  "publishConfig": {
33
36
  "access": "public"
34
37
  },
35
- "gitHead": "52096aedc16222a434b2badfe7e860f671c1c5f8"
38
+ "gitHead": "f20da89af20ee0c17c96e1ea15c6dfd831717ee6"
36
39
  }
@@ -16,7 +16,6 @@
16
16
  // "outFile": "./",
17
17
  // "outDir": "./",
18
18
  // "rootDir": "./src",
19
- "composite": true,
20
19
  // "tsBuildInfoFile": ".tsbuildinfo",
21
20
  // "removeComments": true,
22
21
  // "noEmit": true,
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "noEmit": true
5
+ }
6
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "emitDeclarationOnly": true,
5
+ "composite": true
6
+ }
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "noEmit": true,
5
+ "types": ["node"]
6
+ }
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "emitDeclarationOnly": true,
5
+ "composite": true,
6
+ "types": ["node"]
7
+ }
8
+ }