Skip to content

Commit 4b0a2c3

Browse files
authored
Add type declarations for Vue 2 (#236)
* chore: add types for vue2 * chore: add types declarations in package.json * Revert "chore: add types declarations in package.json" This reverts commit aa85892. * chore: fix build:types2 script
1 parent 8f3972a commit 4b0a2c3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
"test3": "vue-demi-switch 3 && jest",
2929
"prebuild": "npm test",
3030
"build": "npm run build:vue3 && npm run build:vue2",
31-
"build:vue3": "npm run build:es & npm run build:commonjs & npm run build:types",
32-
"build:vue2": "npm run build:es2 & npm run build:commonjs2",
31+
"build:vue3": "npm run build:es & npm run build:commonjs & npm run build:types3",
32+
"build:vue2": "npm run build:es2 & npm run build:commonjs2 & npm run build:types2",
3333
"build:es": "vue-demi-switch 3 && babel src -d es --extensions .ts,.tsx --delete-dir-on-start",
3434
"build:commonjs": "cross-env BABEL_ENV=commonjs vue-demi-switch 3 && babel src -d lib --extensions .ts,.tsx --delete-dir-on-start",
3535
"build:es2": "vue-demi-switch 2 vue2 && babel src -d es2 --extensions .ts,.tsx --delete-dir-on-start",
3636
"build:commonjs2": "cross-env BABEL_ENV=commonjs vue-demi-switch 2 vue2 && babel src -d lib2 --extensions .ts,.tsx --delete-dir-on-start",
37-
"build:types": "vue-demi-switch 3 && tsc & tsc --declarationDir ./es",
37+
"build:types3": "vue-demi-switch 3 && tsc & tsc --declarationDir ./es",
38+
"build:types2": "vue-demi-switch 2 && tsc --declarationDir ./lib2 & tsc --declarationDir ./es2",
3839
"build:docs": "vitepress build docs",
3940
"preversion": "npm run build",
4041
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",

0 commit comments

Comments
 (0)