Skip to content

Commit

Permalink
Merge pull request #416 from alovajs/fix/shared
Browse files Browse the repository at this point in the history
fix: use tsc to generate d.ts
  • Loading branch information
MeetinaXD authored Jun 24, 2024
2 parents c6f2209 + 595aaed commit 2417f06
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
24 changes: 8 additions & 16 deletions packages/shared/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,25 @@
"packageName": "AlovaSharedAssert",
"input": "src/assert.ts",
"output": "dist/assert.{ext}",
"formats": ["esm"],
"withDTS": true
"formats": ["esm"]
},
"function": {
"packageName": "AlovaSharedFunction",
"input": "src/function.ts",
"output": "dist/function.{ext}",
"formats": ["esm"],
"withDTS": true
"formats": ["esm"]
},
"vars": {
"packageName": "AlovaSharedVars",
"input": "src/vars.ts",
"output": "dist/vars.{ext}",
"formats": ["esm"],
"withDTS": true
"formats": ["esm"]
},
"types": {
"packageName": "AlovaSharedTypes",
"input": "src/types.ts",
"output": "dist/types.{ext}",
"formats": ["esm"],
"withDTS": true
"formats": ["esm"]
},
"event": {
"packageName": "AlovaSharedEvent",
Expand All @@ -34,28 +30,24 @@
"formats": ["esm"],
"external": {
"alova": null
},
"withDTS": true
}
},
"createEventManager": {
"packageName": "AlovaSharedEventManager",
"input": "src/createEventManager.ts",
"output": "dist/createEventManager.{ext}",
"formats": ["esm"],
"withDTS": true
"formats": ["esm"]
},
"queueCallback": {
"packageName": "AlovaSharedQueueCallback",
"input": "src/queueCallback.ts",
"output": "dist/queueCallback.{ext}",
"formats": ["esm"],
"withDTS": true
"formats": ["esm"]
},
"FrameworkState": {
"packageName": "AlovaSharedFrameworkState",
"input": "src/model/FrameworkState.ts",
"output": "dist/model/FrameworkState.{ext}",
"formats": ["esm"],
"withDTS": true
"formats": ["esm"]
}
}
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "jest",
"lint": "eslint --ext .ts,.js src/**",
"lint:fix": "eslint --ext .ts,.js src/** --fix",
"build": "npm run clean && alova-scripts build",
"build": "npm run clean && tsc -p tsconfig.build.json && alova-scripts build",
"coveralls": "npm run test:coverage && coveralls < coverage/lcov.info",
"commit": "git add . && git-cz && git push"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/shared/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist",
"emitDeclarationOnly": true,
"resolvePackageJsonExports": false
},
"include": ["src/**/*.ts"]
Expand Down

0 comments on commit 2417f06

Please sign in to comment.