Skip to content

Commit

Permalink
fix(core): 解决模块未定义问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Plumbiu committed Aug 31, 2023
1 parent 0cb3315 commit b5c325c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ declare function genJson(depth: number, relations: Relations, shouldOptimize?: b

declare function genTxt(depth: number, relations: Relations): string

declare function genRelations(): Relations

declare function genTree(maxDep: number, relations: Relations): Tree

Expand Down
3 changes: 3 additions & 0 deletions packages/core/node.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Relations} from '@truth-cli/shared'

declare function genRelations(): Relations
14 changes: 10 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@
"version": "1.1.0",
"type": "module",
"main": "dist/index.js",
"types": "index.d.ts",
"files": [
"dist",
"index.d.ts"
"index.d.ts",
"node.d.ts"
],
"devDependencies": {
"@truth-cli/shared": "workspace:^"
},
"exports": {
".": "./dist/index.js",
"./node": "./dist/node.js"
".": {
"types": "./index.d.ts",
"import": "./dist/index.js"
},
"./node": {
"types": "./node.d.ts",
"import": "./dist/node.js"
}
},
"lint-staged": {
"!(*d).{js,ts}": [
Expand Down

0 comments on commit b5c325c

Please sign in to comment.