add: 增加对ts声明的支持

This commit is contained in:
liyulin 2023-03-05 14:05:06 +08:00
parent 76bf6a15f2
commit f6d205a9d4
6 changed files with 21 additions and 6 deletions

4
packages/docx/index.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare const VueOfficeDocx: {
install: (vue: any) => void;
};
export default VueOfficeDocx;

View File

@ -1,6 +1,6 @@
{
"name": "@vue-office/docx",
"version": "0.2.2",
"version": "0.2.4",
"description": "",
"main": "lib/index.js",
"files": [
@ -11,10 +11,11 @@
"copyFile2": "cp lib/v2/vue-office-docx.umd.js lib/v2/index.js && cp lib/v2/style.css lib/v2/index.css",
"copyFile3": "cp lib/v3/vue-office-docx.umd.js lib/v3/index.js && cp lib/v3/style.css lib/v3/index.css",
"copyReadme": "cp ../../README.md README.md",
"copyType": "cp index.d.ts lib/index.d.ts",
"copyScripts": "mkdir lib/script/ && cp ../../script/postinstall.js lib/script/postinstall.js && cp ../../script/switch-cli.js lib/script/switch-cli.js && cp ../../script/utils.js lib/script/utils.js",
"build:2": "npx vue-demi-switch 2 vue2 && vite build && npm run copyFile2",
"build:3": "npx vue-demi-switch 3 vue3 && vite build && npm run copyFile3",
"build": "npm run clean && npm run build:2 && npm run build:3 && npm run copyScripts && npm run copyReadme",
"build": "npm run clean && npm run build:2 && npm run build:3 && npm run copyScripts && npm run copyReadme && npm run copyType",
"postinstall": "node lib/script/postinstall.js"
},
"peerDependencies": {

4
packages/excel/index.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare const VueOfficeExcel: {
install: (vue: any) => void;
};
export default VueOfficeExcel;

View File

@ -1,6 +1,6 @@
{
"name": "@vue-office/excel",
"version": "0.2.3",
"version": "0.2.4",
"description": "",
"main": "lib/index.js",
"files": [
@ -11,10 +11,11 @@
"copyFile2": "cp lib/v2/vue-office-excel.umd.js lib/v2/index.js && cp src/index.css lib/v2/index.css",
"copyFile3": "cp lib/v3/vue-office-excel.umd.js lib/v3/index.js && cp src/index.css lib/v3/index.css",
"copyReadme": "cp ../../README.md README.md",
"copyType": "cp index.d.ts lib/index.d.ts",
"copyScripts": "mkdir lib/script/ && cp ../../script/postinstall.js lib/script/postinstall.js && cp ../../script/switch-cli.js lib/script/switch-cli.js && cp ../../script/utils.js lib/script/utils.js",
"build:2": "npx vue-demi-switch 2 vue2 && vite build && npm run copyFile2",
"build:3": "npx vue-demi-switch 3 vue3 && vite build && npm run copyFile3",
"build": "npm run clean && npm run build:2 && npm run build:3 && npm run copyScripts && npm run copyReadme",
"build": "npm run clean && npm run build:2 && npm run build:3 && npm run copyScripts && npm run copyReadme && npm run copyType",
"postinstall": "node lib/script/postinstall.js"
},
"peerDependencies": {

4
packages/pdf/index.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare const VueOfficePdf: {
install: (vue: any) => void;
};
export default VueOfficePdf;

View File

@ -1,6 +1,6 @@
{
"name": "@vue-office/pdf",
"version": "0.2.2",
"version": "0.2.4",
"description": "",
"main": "lib/index.js",
"files": [
@ -11,10 +11,11 @@
"copyFile2": "cp lib/v2/vue-office-pdf.umd.js lib/v2/index.js",
"copyFile3": "cp lib/v3/vue-office-pdf.umd.js lib/v3/index.js",
"copyReadme": "cp ../../README.md README.md",
"copyType": "cp index.d.ts lib/index.d.ts",
"copyScripts": "mkdir lib/script/ && cp ../../script/postinstall.js lib/script/postinstall.js && cp ../../script/switch-cli.js lib/script/switch-cli.js && cp ../../script/utils.js lib/script/utils.js",
"build:2": "npx vue-demi-switch 2 vue2 && vite build && npm run copyFile2",
"build:3": "npx vue-demi-switch 3 vue3 && vite build && npm run copyFile3",
"build": "npm run clean && npm run build:2 && npm run build:3 && npm run copyScripts && npm run copyReadme",
"build": "npm run clean && npm run build:2 && npm run build:3 && npm run copyScripts && npm run copyReadme && npm run copyType",
"postinstall": "node lib/script/postinstall.js"
},
"peerDependencies": {