From cbbed6346a437e6b9f05f646f1df0c77d2fb36eb Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sat, 4 Jun 2022 22:40:48 +0200 Subject: [PATCH] Migrate to VueJS 3 --- .browserslistrc | 3 - .eslintrc.cjs | 14 + .eslintrc.js | 15 - babel.config.js | 3 - index.html | 13 + package.json | 33 +- public/index.html | 18 - src/App.vue | 6 +- src/assets/app.scss | 2 +- src/components/SearchInput.vue | 2 +- src/components/Service.vue | 5 +- src/main.js | 16 +- vite.config.js | 15 + vue.config.js | 32 - yarn.lock | 9889 +++++++++----------------------- 15 files changed, 2672 insertions(+), 7394 deletions(-) delete mode 100644 .browserslistrc create mode 100644 .eslintrc.cjs delete mode 100644 .eslintrc.js delete mode 100644 babel.config.js create mode 100644 index.html delete mode 100644 public/index.html create mode 100644 vite.config.js delete mode 100644 vue.config.js diff --git a/.browserslistrc b/.browserslistrc deleted file mode 100644 index 214388f..0000000 --- a/.browserslistrc +++ /dev/null @@ -1,3 +0,0 @@ -> 1% -last 2 versions -not dead diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..ed2ab70 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,14 @@ +/* eslint-env node */ +require("@rushstack/eslint-patch/modern-module-resolution"); + +module.exports = { + root: true, + extends: [ + "plugin:vue/vue3-essential", + "eslint:recommended", + "@vue/eslint-config-prettier", + ], + env: { + "vue/setup-compiler-macros": true, + }, +}; diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 2ac7400..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - root: true, - env: { - node: true, - }, - extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"], - parserOptions: { - parser: "babel-eslint", - }, - rules: { - "no-console": "off", - "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", - "vue/require-v-for-key": "off", - }, -}; diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 162a3ea..0000000 --- a/babel.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - presets: ["@vue/cli-plugin-babel/preset"], -}; diff --git a/index.html b/index.html new file mode 100644 index 0000000..030a6ff --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite App + + +
+ + + diff --git a/package.json b/package.json index 8af02e9..9efa8a1 100644 --- a/package.json +++ b/package.json @@ -2,34 +2,29 @@ "name": "homer", "version": "21.09.1", "scripts": { - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint" + "dev": "vite", + "build": "vite build", + "preview": "vite preview --port 5050", + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore" }, "dependencies": { "@fortawesome/fontawesome-free": "^6.1.1", "bulma": "^0.9.4", - "core-js": "^3.22.7", "js-yaml": "^4.1.0", "lodash.merge": "^4.6.2", "register-service-worker": "^1.7.2", - "vue": "^2.6.14" + "vue": "^3.2.33" }, "devDependencies": { - "@vue/cli-plugin-babel": "~4.5.19", - "@vue/cli-plugin-eslint": "~4.5.19", - "@vue/cli-plugin-pwa": "~4.5.19", - "@vue/cli-service": "~4.5.19", - "@vue/eslint-config-prettier": "^6.0.0", - "babel-eslint": "^10.1.0", - "eslint": "^6.7.2", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-vue": "^6.2.2", - "prettier": "^2.2.1", - "raw-loader": "^4.0.2", - "sass": "^1.26.5", - "sass-loader": "^8.0.2", - "vue-template-compiler": "^2.6.12" + "@rushstack/eslint-patch": "^1.1.0", + "@vitejs/plugin-vue": "^2.3.1", + "@vue/cli-plugin-pwa": "^5.0.4", + "@vue/eslint-config-prettier": "^7.0.0", + "eslint": "^8.5.0", + "eslint-plugin-vue": "^8.2.0", + "prettier": "^2.5.1", + "sass": "^1.52.2", + "vite": "^2.9.9" }, "license": "Apache-2.0" } diff --git a/public/index.html b/public/index.html deleted file mode 100644 index e38d444..0000000 --- a/public/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - -
- - - diff --git a/src/App.vue b/src/App.vue index 664867f..43ba322 100644 --- a/src/App.vue +++ b/src/App.vue @@ -140,8 +140,8 @@