diff --git a/packages/shared/build.json b/packages/shared/build.json index 63edf217..2702d8ba 100644 --- a/packages/shared/build.json +++ b/packages/shared/build.json @@ -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", @@ -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"] } } diff --git a/packages/shared/package.json b/packages/shared/package.json index 51f7403b..d96d9c16 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -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" }, diff --git a/packages/shared/tsconfig.build.json b/packages/shared/tsconfig.build.json index d554b3ca..0ee10a8f 100644 --- a/packages/shared/tsconfig.build.json +++ b/packages/shared/tsconfig.build.json @@ -1,6 +1,9 @@ { "extends": "./tsconfig.json", "compilerOptions": { + "declaration": true, + "declarationDir": "./dist", + "emitDeclarationOnly": true, "resolvePackageJsonExports": false }, "include": ["src/**/*.ts"]