From 4f212f1bf4495357bce7cafb26f9c8981469cf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Wed, 3 Jul 2024 07:32:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install-datav-patch.js | 7 ++ package.json | 3 +- src/plugins/datav/patch/package.json | 77 +++++++++++++++++++ .../datav/patch/ install-datav-patch.js | 8 ++ 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 install-datav-patch.js create mode 100644 src/plugins/datav/patch/package.json create mode 100644 src/plugins/datav/patch/ install-datav-patch.js diff --git a/install-datav-patch.js b/install-datav-patch.js new file mode 100644 index 00000000..21a4182c --- /dev/null +++ b/install-datav-patch.js @@ -0,0 +1,7 @@ +const path = require('path') +const fs = require('fs') + +const libPackagePath = path.join(__dirname, 'src/plugins/datav/patch/package.json') +const modulesPackagePath = path.join(__dirname, 'node_modules/@dataview/datav-vue3/package.json') + +fs.writeFileSync(modulesPackagePath, fs.readFileSync(libPackagePath)) \ No newline at end of file diff --git a/package.json b/package.json index 180faaf6..84b40e43 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src", "lint:format": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"", "lint:style": "stylelint --fix \"./src/**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", - "lint:lint-staged": "lint-staged -c " + "lint:lint-staged": "lint-staged -c ", + "postinstall": "node install-datav-patch.js" }, "dependencies": { "@dataview/datav-vue3": "0.0.0-test.1672506674342", diff --git a/src/plugins/datav/patch/package.json b/src/plugins/datav/patch/package.json new file mode 100644 index 00000000..80516bf5 --- /dev/null +++ b/src/plugins/datav/patch/package.json @@ -0,0 +1,77 @@ +{ + "name": "@dataview/datav-vue3", + "version": "0.0.0-test.1672506674342", + "description": "Vue3 Large screen data display component library", + "main": "./cjs/index.js", + "module": "./es/index.mjs", + "types": "./es/index.d.ts", + "scripts": { + "prepare": "husky install", + "dev": "ts-node scripts/dev/init.ts && vite --config scripts/dev/vite.config.ts", + "clear": "rm es cjs umd -rf", + "build": "yarn clear && yarn build:es && yarn build:umd", + "build:es": "vite build --config scripts/build/vite.config.ts", + "build:umd": "vite build --config scripts/build/vite.config.umd.ts", + "check": "yarn lint && yarn lint:type && yarn lint:format", + "lint": "eslint --fix --ext .ts,.tsx src", + "lint:type": "ts-node docs/.vuepress/init && tsc --project ./tsconfig.json --noEmit", + "lint:format": "prettier --check \"src/**/*.ts\" \"src/**/*.tsx\" \"src/**/*.less\"", + "format": "prettier --write \"src/**/*.ts\" \"src/**/*.tsx\" \"src/**/*.less\"", + "test:run": "vitest run", + "docs:dev": "ts-node docs/.vuepress/init && vuepress dev docs", + "docs:build": "yarn build:es && vuepress build docs", + "version:test": "ts-node scripts/release/version-generator --type=test" + }, + "files": [ + "es", + "lib", + "umd" + ], + "keywords": [ + "datav" + ], + "author": "", + "license": "ISC", + "devDependencies": { + "@commitlint/cli": "17.0.2", + "@commitlint/config-conventional": "17.0.2", + "@types/less": "^3.0.3", + "@types/lodash-es": "^4.17.6", + "@types/node": "^18.7.18", + "@types/prettier": "^2.7.2", + "@types/semver": "^7.3.13", + "@typescript-eslint/eslint-plugin": "^5.36.1", + "@typescript-eslint/parser": "^5.36.1", + "@vitejs/plugin-vue": "^3.1.0", + "@vitejs/plugin-vue-jsx": "^2.0.0", + "@vue/eslint-config-prettier": "^7.0.0", + "@vue/eslint-config-typescript": "^11.0.1", + "@vuepress/client": "^2.0.0-beta.60", + "eslint": "^8.23.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-vue": "^9.4.0", + "execa": "5.1.1", + "fs-extra": "^11.1.0", + "glob": "^8.0.3", + "husky": "^8.0.1", + "less": "^4.1.3", + "ora": "5.4.1", + "prettier": "^2.7.1", + "semver": "^7.3.8", + "ts-morph": "^17.0.1", + "ts-node": "^10.9.1", + "typescript": "^4.8.3", + "vite": "^4.0.0", + "vite-plugin-dts": "^1.7.1", + "vue": "^3.2.39", + "vuepress": "^2.0.0-beta.60" + }, + "dependencies": { + "@jiaminghi/color": "^0.1.1", + "classnames": "^2.3.2", + "lodash-es": "^4.17.21" + }, + "peerDependencies": { + "vue": ">=3.2.0" + } +} diff --git a/src/plugins/datav/patch/ install-datav-patch.js b/src/plugins/datav/patch/ install-datav-patch.js new file mode 100644 index 00000000..666eb934 --- /dev/null +++ b/src/plugins/datav/patch/ install-datav-patch.js @@ -0,0 +1,8 @@ +const path = require('path') +const fs = require('fs') + +const libPackagePath = path.join(__dirname, 'src/datav/patch/package.json') +const modulesPackagePath = path.join(__dirname, 'node_modules/@dataview/datav-vue3/package.json') + +fs.writeFileSync(modulesPackagePath, fs.readFileSync(libPackagePath)) + \ No newline at end of file