Skip to content

Commit 98585e8

Browse files
committed
tsconfig.json
1 parent 7cf835f commit 98585e8

File tree

5 files changed

+48
-29
lines changed

5 files changed

+48
-29
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"test-stage2": "env TS_NODE_COMPILER_OPTIONS='{\"experimentalDecorators\": true }' mocha -r ts-node/register test/test.ts",
3636
"test-stage3": "env TS_NODE_COMPILER_OPTIONS='{\"experimentalDecorators\": false }' mocha -r ts-node/register test/test.ts",
3737
"build": "npm run build:cjs && npm run build:esm",
38-
"build:cjs": "./node_modules/.bin/tsc -outDir dist/cjs",
39-
"build:esm": "./node_modules/.bin/tsc -outDir dist/esm -module ES6",
38+
"build:cjs": "./node_modules/.bin/tsc --project ./tsconfig/tsconfig.cjs.json",
39+
"build:esm": "./node_modules/.bin/tsc --project ./tsconfig/tsconfig.esm.json",
4040
"lint": "eslint .",
4141
"lint:fix": "eslint . --fix",
4242
"watch": "./node_modules/.bin/tsc -outDir dist/esm -module ES6 --watch"

tsconfig.json

+1-27
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,3 @@
11
{
2-
"compilerOptions": {
3-
"outDir": "./dist",
4-
"baseUrl": ".",
5-
"rootDir": "./src",
6-
"moduleResolution": "node",
7-
"module": "CommonJS",
8-
"target": "ES6",
9-
"strict": true,
10-
"sourceMap": true,
11-
"lib": [
12-
"esnext",
13-
"DOM"
14-
],
15-
"allowJs": true,
16-
"skipLibCheck": true,
17-
"esModuleInterop": true,
18-
"isolatedModules": true,
19-
"emitDeclarationOnly": false,
20-
"experimentalDecorators": true,
21-
"composite": false,
22-
"declaration": true,
23-
"declarationMap": true,
24-
"noUnusedLocals": false
25-
},
26-
"include": [
27-
"./src/**/*.ts",
28-
],
2+
"extends":"./tsconfig/tsconfig.json"
293
}

tsconfig/tsconfig.cjs.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../dist/cjs",
5+
"module": "CommonJS",
6+
}
7+
}

tsconfig/tsconfig.esm.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../dist/esm",
5+
"module": "ES6",
6+
}
7+
}

tsconfig/tsconfig.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES6",
4+
"moduleResolution": "Node",
5+
"rootDir": "../src",
6+
"paths": {
7+
"@/*": [
8+
"../src/*"
9+
]
10+
},
11+
"strict": true,
12+
"sourceMap": true,
13+
"lib": [
14+
"esnext",
15+
"DOM"
16+
],
17+
"allowJs": true,
18+
"skipLibCheck": true,
19+
"esModuleInterop": true,
20+
"isolatedModules": true,
21+
"emitDeclarationOnly": false,
22+
"experimentalDecorators": true,
23+
"composite": false,
24+
"declaration": true,
25+
"declarationMap": true,
26+
"noUnusedLocals": false
27+
},
28+
"files": [
29+
"../src/index.ts"
30+
]
31+
}

0 commit comments

Comments
 (0)