Skip to content

Commit 2066f40

Browse files
author
zhaozhiwen
committed
feat(types): 输出类型声明文件
1 parent 9da9c84 commit 2066f40

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
*.js
22
doc-comps
3-
demo
3+
components/**/demo

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
"version": "1.0.0",
44
"description": "",
55
"main": "index.js",
6+
"typings": "types/index.d.ts",
67
"scripts": {
78
"dev": "docz dev",
89
"start": "npm run dev",
910
"build:doc": "rimraf doc-site && docz build",
1011
"preview:doc": "docz serve",
12+
"build:types": "tsc --emitDeclarationOnly",
1113
"commit": "git-cz",
1214
"test": "echo \"Error: no test specified\" && exit 1"
1315
},
@@ -29,6 +31,7 @@
2931
"devDependencies": {
3032
"@commitlint/cli": "^8.2.0",
3133
"@commitlint/config-conventional": "^8.2.0",
34+
"@types/vfile-message": "^2.0.0",
3235
"@umijs/fabric": "^1.2.12",
3336
"antd": "^3.26.3",
3437
"babel-plugin-import": "^1.13.0",

tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"compilerOptions": {
3-
"rootDir": "components",
4-
"baseUrl": "components",
3+
"allowJs": false,
54
"target": "esnext",
65
"module": "commonjs",
76
"jsx": "react",
@@ -12,5 +11,6 @@
1211
"allowSyntheticDefaultImports": true,
1312
"esModuleInterop": true
1413
},
15-
"exclude": ["components/**/demo", "doc-comps"]
14+
"include": ["components"],
15+
"exclude": ["components/**/demo"]
1616
}

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@
15391539
resolved "https://registry.npm.taobao.org/@types/unist/download/@types/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e"
15401540
integrity sha1-nAiGeYdvN061mD8VDUeHqm+zLX4=
15411541

1542-
"@types/vfile-message@*":
1542+
"@types/vfile-message@*", "@types/vfile-message@^2.0.0":
15431543
version "2.0.0"
15441544
resolved "https://registry.npm.taobao.org/@types/vfile-message/download/@types/vfile-message-2.0.0.tgz#690e46af0fdfc1f9faae00cd049cc888957927d5"
15451545
integrity sha1-aQ5Grw/fwfn6rgDNBJzIiJV5J9U=

0 commit comments

Comments
 (0)