@jterrazz/typescript 2.4.3 → 3.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/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # Package Typescript
1
+ # @jterrazz/typescript
2
2
 
3
- This package provides a consistent TypeScript configuration for projects. It includes two commands: `ts-compiler` and `ts-runner`.
3
+ > Ready-to-use TypeScript configurations and build tools for modern projects.
4
4
 
5
- ## Installation
5
+ A simple package that provides TypeScript configurations for different project types and fast build commands using SWC.
6
6
 
7
- Install the package globally or locally:
7
+ ## Installation
8
8
 
9
9
  ```bash
10
10
  npm install @jterrazz/typescript
@@ -12,28 +12,47 @@ npm install @jterrazz/typescript
12
12
 
13
13
  ## Usage
14
14
 
15
- ### TypeScript Configuration
15
+ ### 1. Choose a TypeScript configuration
16
16
 
17
- Use the provided `tsconfig.json` in your project:
18
-
19
- ```json5
20
- // tsconfig.json
17
+ ```json
18
+ // tsconfig.json - Pick one:
19
+ {
20
+ "extends": "@jterrazz/typescript/tsconfig/node" // Node.js projects
21
+ }
22
+ {
23
+ "extends": "@jterrazz/typescript/tsconfig/next" // Next.js projects
24
+ }
21
25
  {
22
- extends: '@jterrazz/typescript/tsconfig/node-esm',
23
- compilerOptions: {
24
- // Your custom compiler options here
25
- },
26
+ "extends": "@jterrazz/typescript/tsconfig/expo" // Expo/React Native
26
27
  }
27
28
  ```
28
29
 
29
- ### Commands
30
+ ### 2. Use the build commands
30
31
 
31
- - `ts-compiler`: Compile TypeScript files.
32
- - `ts-runner`: Execute TypeScript files.
32
+ ```bash
33
+ npx ts-dev # Development with watch mode
34
+ npx ts-build # Production build (generates .js, .d.ts, .cjs)
35
+ ```
36
+
37
+ ## What you get
38
+
39
+ - **Fast compilation** with SWC (10x faster than tsc)
40
+ - **Zero configuration** - works out of the box
41
+ - **Multiple outputs** - ESM + CommonJS + TypeScript declarations
42
+ - **Source maps** for debugging
43
+
44
+ ## Project structure
45
+
46
+ ```
47
+ your-project/
48
+ ├── src/
49
+ │ └── index.ts # Your TypeScript code
50
+ ├── dist/ # Generated files
51
+ └── tsconfig.json # Extends this package
52
+ ```
33
53
 
34
- ## Implementation Details
54
+ That's it! The package handles all the complex build configuration so you can focus on writing code.
35
55
 
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.
56
+ ## License
38
57
 
39
- Happy coding!
58
+ MIT © [Jean-Baptiste Terrazzoni](https://github.com/jterrazz)
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@jterrazz/typescript",
3
3
  "author": "Jean-Baptiste Terrazzoni <contact@jterrazz.com>",
4
- "version": "2.4.3",
4
+ "version": "3.0.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
15
  "lint": "prettier --check .",
@@ -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