@jterrazz/typescript 2.4.3 → 3.1.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/README.md CHANGED
@@ -1,39 +1,56 @@
1
1
  # Package Typescript
2
2
 
3
- This package provides a consistent TypeScript configuration for projects. It includes two commands: `ts-compiler` and `ts-runner`.
3
+ Drop-in tsconfig presets for consistent builds.
4
4
 
5
5
  ## Installation
6
6
 
7
- Install the package globally or locally:
8
-
9
7
  ```bash
10
8
  npm install @jterrazz/typescript
11
9
  ```
12
10
 
13
11
  ## Usage
14
12
 
15
- ### TypeScript Configuration
16
-
17
- Use the provided `tsconfig.json` in your project:
13
+ ### 1. Choose a TypeScript configuration
18
14
 
19
- ```json5
20
- // tsconfig.json
15
+ ```json
16
+ // tsconfig.json - Pick one:
17
+ {
18
+ "extends": "@jterrazz/typescript/tsconfig/node" // Node.js projects
19
+ }
21
20
  {
22
- extends: '@jterrazz/typescript/tsconfig/node-esm',
23
- compilerOptions: {
24
- // Your custom compiler options here
25
- },
21
+ "extends": "@jterrazz/typescript/tsconfig/next" // Next.js projects
26
22
  }
23
+ {
24
+ "extends": "@jterrazz/typescript/tsconfig/expo" // Expo/React Native
25
+ }
26
+ ```
27
+
28
+ ### 2. Use the build commands
29
+
30
+ ```bash
31
+ npx ts-dev # Development with watch mode
32
+ npx ts-build # Production build (generates .js, .d.ts, .cjs)
27
33
  ```
28
34
 
29
- ### Commands
35
+ ## What you get
36
+
37
+ - **Fast compilation** with SWC (10x faster than tsc)
38
+ - **Zero configuration** - works out of the box
39
+ - **Multiple outputs** - ESM + CommonJS + TypeScript declarations
40
+ - **Source maps** for debugging
30
41
 
31
- - `ts-compiler`: Compile TypeScript files.
32
- - `ts-runner`: Execute TypeScript files.
42
+ ## Project structure
43
+
44
+ ```
45
+ your-project/
46
+ ├── src/
47
+ │ └── index.ts # Your TypeScript code
48
+ ├── dist/ # Generated files
49
+ └── tsconfig.json # Extends this package
50
+ ```
33
51
 
34
- ## Implementation Details
52
+ That's it! The package handles all the complex build configuration so you can focus on writing code.
35
53
 
36
- - The package reads directly from the `tsconfig.json` file, keeping the implementation details hidden.
37
- - Consumers don't need to worry about the underlying scripts.
54
+ ## License
38
55
 
39
- Happy coding!
56
+ MIT © [Jean-Baptiste Terrazzoni](https://github.com/jterrazz)
package/package.json CHANGED
@@ -1,46 +1,45 @@
1
1
  {
2
2
  "name": "@jterrazz/typescript",
3
3
  "author": "Jean-Baptiste Terrazzoni <contact@jterrazz.com>",
4
- "version": "2.4.3",
4
+ "version": "3.1.0",
5
5
  "files": [
6
6
  "tsconfig",
7
7
  "bin"
8
8
  ],
9
9
  "type": "module",
10
10
  "bin": {
11
- "ts-compile": "bin/ts-compile.sh",
12
- "ts-watch": "bin/ts-watch.sh"
11
+ "ts-build": "bin/ts-build.sh",
12
+ "ts-dev": "bin/ts-dev.sh"
13
13
  },
14
14
  "scripts": {
15
- "lint": "prettier --check .",
15
+ "lint": "biome check",
16
16
  "test": "# no test script",
17
17
  "build": "# no build script"
18
18
  },
19
19
  "devDependencies": {
20
- "@jterrazz/quality": "^2.2.6"
20
+ "@jterrazz/quality": "^5.0.1"
21
21
  },
22
22
  "dependencies": {
23
- "@swc/cli": "^0.7.7",
24
- "@swc/core": "1.11.29",
25
- "@types/node": "22.14.1",
26
- "nodemon": "3.1.10",
27
- "rollup": "4.41.1",
23
+ "@swc/cli": "^0.7.9",
24
+ "@swc/core": "1.15.3",
25
+ "nodemon": "3.1.11",
26
+ "rollup": "4.53.3",
28
27
  "tsconfig-to-swcconfig": "2.8.1",
29
- "typescript": "5.8.3"
28
+ "typescript": "5.9.3"
30
29
  },
31
30
  "optionalDependencies": {
32
- "@swc/core-linux-arm64-gnu": "1.11.29",
33
- "@swc/core-linux-x64-gnu": "1.11.29",
34
- "@swc/core-linux-x64-musl": "1.11.29",
35
- "@swc/core-darwin-x64": "1.11.29",
36
- "@swc/core-darwin-arm64": "1.11.29",
37
- "@swc/core-win32-x64-msvc": "1.11.29",
38
- "@rollup/rollup-linux-arm64-gnu": "4.41.1",
39
- "@rollup/rollup-linux-x64-gnu": "4.41.1",
40
- "@rollup/rollup-linux-x64-musl": "4.41.1",
41
- "@rollup/rollup-darwin-x64": "4.41.1",
42
- "@rollup/rollup-darwin-arm64": "4.41.1",
43
- "@rollup/rollup-win32-x64-msvc": "4.41.1"
31
+ "@swc/core-linux-arm64-gnu": "1.15.3",
32
+ "@swc/core-linux-x64-gnu": "1.15.3",
33
+ "@swc/core-linux-x64-musl": "1.15.3",
34
+ "@swc/core-darwin-x64": "1.15.3",
35
+ "@swc/core-darwin-arm64": "1.15.3",
36
+ "@swc/core-win32-x64-msvc": "1.15.3",
37
+ "@rollup/rollup-linux-arm64-gnu": "4.53.3",
38
+ "@rollup/rollup-linux-x64-gnu": "4.53.3",
39
+ "@rollup/rollup-linux-x64-musl": "4.53.3",
40
+ "@rollup/rollup-darwin-x64": "4.53.3",
41
+ "@rollup/rollup-darwin-arm64": "4.53.3",
42
+ "@rollup/rollup-win32-x64-msvc": "4.53.3"
44
43
  },
45
44
  "publishConfig": {
46
45
  "registry": "https://registry.npmjs.org/"
@@ -4,11 +4,15 @@
4
4
 
5
5
  "compilerOptions": {
6
6
  "allowJs": true,
7
+ "baseUrl": ".",
7
8
  "esModuleInterop": true,
8
9
  "jsx": "react-native",
9
10
  "lib": ["DOM", "ESNext"],
10
11
  "moduleResolution": "node",
11
12
  "noEmit": true,
13
+ "paths": {
14
+ "@/*": ["src/*"]
15
+ },
12
16
  "resolveJsonModule": true,
13
17
  "skipLibCheck": true,
14
18
  "target": "ESNext"
File without changes
File without changes
File without changes