Skip to content

Commit 0a74184

Browse files
committed
WIP
1 parent a4b7dcd commit 0a74184

File tree

5 files changed

+47
-9
lines changed

5 files changed

+47
-9
lines changed

packages/network/index.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/network/package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
"private": true,
55
"main": "index.js",
66
"scripts": {
7-
"build-prod": "tsc --project .",
8-
"check-ts": "tsc --noEmit && yarn -s tslint",
9-
"clean": "rimraf --glob 'lib/**/*.js'",
7+
"build": "yarn build:esm && yarn build:cjs",
8+
"build-old": "tsc --project .",
9+
"build-prod": "yarn build",
10+
"build:cjs": "rimraf cjs && tsc -p tsconfig.cjs.json",
11+
"build:esm": "rimraf esm && tsc -p tsconfig.esm.json",
12+
"check-ts": "tsc -p tsconfig.cjs.json --noEmit && yarn -s tslint -p tsconfig.cjs.json",
13+
"clean": "rimraf cjs esm",
1014
"clean-deps": "rimraf node_modules",
1115
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .",
16+
"rimraf": "6.0.1",
1217
"test": "yarn test-unit",
1318
"test-debug": "npx vitest --inspect-brk --no-file-parallelism --test-timeout=0 --hook-timeout=0",
1419
"test-unit": "vitest run",
@@ -38,7 +43,8 @@
3843
"vitest": "^3.2.4"
3944
},
4045
"files": [
41-
"lib"
46+
"cjs",
47+
"esm"
4248
],
4349
"types": "./lib/index.ts",
4450
"nx": {}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"include": [
3+
"lib/*.ts"
4+
],
5+
"compilerOptions": {
6+
"strict": true,
7+
"noImplicitAny": true,
8+
"esModuleInterop": true,
9+
"noUncheckedIndexedAccess": true,
10+
"skipLibCheck": true,
11+
"resolveJsonModule": true,
12+
"types": [
13+
"node"
14+
]
15+
}
16+
}

packages/network/tsconfig.cjs.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"rootDir": "./lib",
5+
"outDir": "./cjs",
6+
"target": "ES2022",
7+
"module": "CommonJS",
8+
"moduleResolution": "node",
9+
"declaration": true
10+
}
11+
}

packages/network/tsconfig.esm.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"rootDir": "./src",
5+
"outDir": "./esm",
6+
"target": "ES2022",
7+
"module": "ES2022",
8+
"moduleResolution": "node"
9+
}
10+
}

0 commit comments

Comments
 (0)