Skip to content

Commit f48b2a8

Browse files
authored
Merge pull request #67 from alienzhou/types
build: add d.ts
2 parents 35b5e93 + b00bd66 commit f48b2a8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
"static": "run-p watch serve",
1515
"typings": "tsc -d --declarationDir typings",
1616
"start": "node script/dev.js",
17+
"types": "tsc --emitDeclarationOnly && tscpaths -p tsconfig.json -s ./src -o ./dist",
1718
"build": "export target=dist && node script/build.js",
18-
"prepublishOnly": "npm run build"
19+
"prepublishOnly": "npm run build && npm run types"
1920
},
2021
"husky": {
2122
"hooks": {
@@ -67,6 +68,7 @@
6768
"ts-loader": "^5.3.0",
6869
"ts-node": "^8.10.1",
6970
"tsconfig-paths": "^3.9.0",
71+
"tscpaths": "0.0.9",
7072
"typescript": "^3.1.6",
7173
"webpack": "^4.25.1",
7274
"webpack-cli": "^3.1.2",

tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"compilerOptions": {
33
"esModuleInterop": true,
4+
"declaration": true,
45
"sourceMap": true,
6+
"outDir": "./dist",
57
"lib": [
68
"dom",
79
"dom.iterable",

0 commit comments

Comments
 (0)