Skip to content

Commit efdb5b3

Browse files
chore: emit and publish types to npm (#29)
* chore: emit and publish type to npm * fix: typings folder nesting
1 parent 974cfc6 commit efdb5b3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
"require": "./dist/petite-vue.umd.js"
1616
}
1717
},
18+
"types": "./dist/types/index.d.ts",
1819
"scripts": {
1920
"dev": "vite",
20-
"build": "vite build",
21+
"build": "vite build && tsc --emitDeclarationOnly && mv dist/src dist/types",
2122
"prepublishOnly": "tsc --noEmit && yarn build"
2223
},
2324
"repository": {

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"compilerOptions": {
33
"baseUrl": ".",
44
"outDir": "dist",
5+
"declaration": true,
56
"sourceMap": false,
67
"target": "esnext",
78
"module": "esnext",

0 commit comments

Comments
 (0)