From 0dd53c29c4227d1b845971d3d5226df675a3d6b0 Mon Sep 17 00:00:00 2001 From: yujinpan <1192878390@qq.com> Date: Wed, 29 May 2024 15:52:26 +0800 Subject: [PATCH] chore: remove unused --- .env | 0 .gitignore | 1 + babel.config.js | 4 ---- package.json | 11 +++++------ prettier.config.js | 10 ---------- vite.config.ts | 47 +--------------------------------------------- 6 files changed, 7 insertions(+), 66 deletions(-) delete mode 100755 .env delete mode 100755 babel.config.js delete mode 100755 prettier.config.js diff --git a/.env b/.env deleted file mode 100755 index e69de29..0000000 diff --git a/.gitignore b/.gitignore index 3dc881e..efc39c6 100755 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ stat lib package-lock.json types +docs/.vitepress/cache # local env files .env.local diff --git a/babel.config.js b/babel.config.js deleted file mode 100755 index 7f40374..0000000 --- a/babel.config.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - extends: 'rollupx/babel.config.js', - exclude: 'node_modules/**' -}; diff --git a/package.json b/package.json index ae39b59..505b36c 100755 --- a/package.json +++ b/package.json @@ -32,23 +32,22 @@ "devDependencies": { "@rushstack/eslint-patch": "^1.1.0", "@types/jsdom": "^16.2.14", - "@types/node": "^18", + "@types/node": "*", "@vitejs/plugin-vue2": "^2.3.0", "@vitejs/plugin-vue2-jsx": "^1.0.3", - "@vue/eslint-config-prettier": "^9.0.0", - "@vue/eslint-config-typescript": "^13.0.0", + "@vue/eslint-config-prettier": "^7.0.0", + "@vue/eslint-config-typescript": "^11.0.0", "@vue/tsconfig": "^0.1.3", "eslint": "^8", "eslint-import-resolver-typescript": "^3.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-vue": "^9.0.0", - "path-ops": "^1.0.0", - "prettier": "^3", + "prettier": "^2", "release-ops": "^1.0.1", "rollup": "^4.18.0", "rollup-plugin-vue": "^5.1.9", "rollupx": "^3", - "sass": "^1.77.2", + "sass": "^1.x", "typescript": "^5", "vite": "^5", "vitest": "^1.6.0" diff --git a/prettier.config.js b/prettier.config.js deleted file mode 100755 index 087d84b..0000000 --- a/prettier.config.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * prettier options - * @description - * [prettier rules](https://prettier.io/docs/en/options.html) - */ -module.exports = { - singleQuote: true, - arrowParens: 'always', - semi: true -}; diff --git a/vite.config.ts b/vite.config.ts index d63416b..9c915d9 100755 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,11 +1,7 @@ import vue2 from '@vitejs/plugin-vue2'; -import vue2Jsx from '@vitejs/plugin-vue2-jsx'; import { resolve } from 'path'; -import { resolveWithAlias } from 'path-ops'; import { defineConfig } from 'vitest/config'; -import pkg from './package.json'; - const alias = { '@': resolve('src'), }; @@ -13,52 +9,11 @@ const alias = { // https://vitejs.dev/config/ export default defineConfig({ base: './', - plugins: [ - vue2(), - vue2Jsx({ - // fork from @vue/babel-preset-app - babelPlugins: [ - ['@babel/plugin-proposal-decorators', { legacy: true }], - '@babel/plugin-proposal-class-properties', - ], - }), - ], - server: { - proxy: { - '/api': { - target: 'http://wh.greatmap.com.cn:16440/', - }, - }, - }, + plugins: [vue2()], resolve: { alias, extensions: ['.vue', '.js', '.ts', '.jsx', '.tsx', '.json'], }, - css: { - preprocessorOptions: { - scss: { - // ignore external sass warnings for "10px / 2px" - quietDeps: true, - // resolve start path for "~", like: "~external/style/var.scss" - importer: (url: string) => { - return { - file: resolveWithAlias( - url.startsWith('~') ? url.slice(1) : url, - alias, - ), - }; - }, - }, - }, - }, - define: { - // define package build info, print them in console - __BUILD__: JSON.stringify({ - name: pkg.name, - version: pkg.version, - dateTime: new Date().toLocaleString(), - }), - }, test: { globals: true, environment: 'jsdom',