Skip to content

Commit 33d5f9f

Browse files
committed
upgrade to Vite 5
1 parent 4943329 commit 33d5f9f

File tree

8 files changed

+1208
-1030
lines changed

8 files changed

+1208
-1030
lines changed

Diff for: .eslintrc.js renamed to .eslintrc.cjs

+14-14
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ module.exports = {
66
jest: true,
77
},
88
extends: [
9-
'plugin:vue/essential',
109
'eslint:recommended',
11-
'@vue/prettier',
10+
'plugin:vue/essential',
11+
'prettier'
1212
],
1313
parserOptions: {
1414
ecmaVersion: 2020,
@@ -17,18 +17,18 @@ module.exports = {
1717
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
1818
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
1919
quotes: [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }],
20-
'prettier/prettier': [
21-
'warn',
22-
{
23-
semi: false,
24-
trailingComma: 'all',
25-
singleQuote: true,
26-
printWidth: 80,
27-
tabWidth: 2,
28-
arrow_parens: 'avoid',
29-
endOfLine: 'lf',
30-
},
31-
],
20+
// 'prettier': [
21+
// 'warn',
22+
// {
23+
// semi: false,
24+
// trailingComma: 'all',
25+
// singleQuote: true,
26+
// printWidth: 80,
27+
// tabWidth: 2,
28+
// arrow_parens: 'avoid',
29+
// endOfLine: 'lf',
30+
// },
31+
// ],
3232
},
3333
overrides: [
3434
{

Diff for: .gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,11 @@ node_modules
2727
# https://vitejs.dev/guide/env-and-mode.html#env-files
2828
*.local
2929

30+
31+
# Vite Ruby
32+
/public/vite*
33+
node_modules
34+
# Vite uses dotenv and suggests to ignore local-only env files. See
35+
# https://vitejs.dev/guide/env-and-mode.html#env-files
36+
*.local
37+

Diff for: Gemfile.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ GEM
116116
mini_magick (>= 4.9.5, < 5)
117117
ruby-vips (>= 2.0.17, < 3)
118118
io-console (0.6.0)
119-
irb (1.8.3)
119+
irb (1.9.1)
120120
rdoc
121121
reline (>= 0.3.8)
122122
jbuilder (2.11.5)
@@ -136,7 +136,7 @@ GEM
136136
kaminari-core (= 1.2.2)
137137
kaminari-core (1.2.2)
138138
language_server-protocol (3.17.0.3)
139-
loofah (2.21.4)
139+
loofah (2.22.0)
140140
crass (~> 1.0.2)
141141
nokogiri (>= 1.12.0)
142142
maglev-injectable (2.1.1)
@@ -160,11 +160,11 @@ GEM
160160
net-smtp (0.4.0)
161161
net-protocol
162162
nio4r (2.5.9)
163-
nokogiri (1.15.4-arm64-darwin)
163+
nokogiri (1.15.5-arm64-darwin)
164164
racc (~> 1.4)
165-
nokogiri (1.15.4-x86_64-darwin)
165+
nokogiri (1.15.5-x86_64-darwin)
166166
racc (~> 1.4)
167-
nokogiri (1.15.4-x86_64-linux)
167+
nokogiri (1.15.5-x86_64-linux)
168168
racc (~> 1.4)
169169
parallel (1.23.0)
170170
parser (3.2.2.4)
@@ -306,7 +306,7 @@ GEM
306306
vite_rails (3.0.17)
307307
railties (>= 5.1, < 8)
308308
vite_ruby (~> 3.0, >= 3.2.2)
309-
vite_ruby (3.3.4)
309+
vite_ruby (3.5.0)
310310
dry-cli (>= 0.7, < 2)
311311
rack-proxy (~> 0.6, >= 0.6.1)
312312
zeitwerk (~> 2.2)

Diff for: app/frontend/editor/components/kit/icon.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ export default {
2323
},
2424
computed: {
2525
icon() {
26-
return defineAsyncComponent(() =>
27-
import(`../../assets/${this.library}/${this.name}.svg`),
28-
)
26+
return defineAsyncComponent(() => {
27+
const path = `../../assets/${this.library}/${this.name}.svg`
28+
return import(/* @vite-ignore */ path)
29+
})
30+
2931
},
3032
},
3133
}

Diff for: app/frontend/entrypoints/editor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ import '~/editor/design/application.scss'
55

66
document.addEventListener('DOMContentLoaded', () => {
77
Editor.start()
8-
})
8+
})

Diff for: package.json

+17-15
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
"name": "maglev",
33
"private": true,
44
"scripts": {
5+
"lint": "eslint --ext .js,.vue app/frontend/editor",
6+
"prettier": "prettier --config .prettierrc 'app/frontend/**/*.{vue,js}'",
57
"prettier-format": "prettier --config .prettierrc 'app/frontend/**/*.{vue,js}' --write",
68
"test": "vitest"
79
},
10+
"version": "0.1.0",
11+
"type": "module",
812
"dependencies": {
913
"axios": "^0.21.1",
1014
"camelcase-object-deep": "^1.1.3",
@@ -15,31 +19,29 @@
1519
"tiptap-extensions": "^1.34.0",
1620
"turbolinks": "^5.2.0",
1721
"v-tooltip": "^2.1.3",
18-
"vue": "^2.7.13",
22+
"vue": "^2.7.15",
1923
"vue-i18n": "^8.21.1",
2024
"vue-router": "^3.4.4",
2125
"vue-window-size": "0.6.2",
2226
"vuedraggable": "^2.24.3",
2327
"vuex": "^3.5.1"
2428
},
25-
"version": "0.1.0",
2629
"devDependencies": {
27-
"@vitejs/plugin-vue2": "^2.0.0",
28-
"@vue/compiler-dom": "^3.2.41",
30+
"@vitejs/plugin-vue2": "^2.3.1",
2931
"@vue/test-utils": "^1.3.1",
3032
"autoprefixer": "^10.4.13",
31-
"eslint": "^8.26.0",
32-
"jsdom": "^20.0.2",
33-
"postcss": "^8.4.18",
34-
"prettier": "^2.3.2",
35-
"sass": "^1.55.0",
33+
"eslint": "^8.54.0",
34+
"eslint-plugin-vue": "^9.18.1",
35+
"eslint-config-prettier": "^9.0.0",
36+
"jsdom": "^23.0.0",
37+
"prettier": "^3.1.0",
38+
"sass": "^1.69.5",
3639
"tailwindcss": "^3.2.1",
37-
"vite": "^4.3.0",
38-
"vite-plugin-eslint": "^1.8.1",
39-
"vite-plugin-ruby": "^3.2.0",
40-
"vite-plugin-vue2-svg": "^0.3.0",
41-
"vitest": "^0.24.4",
42-
"vue-template-compiler": "^2.7.13"
40+
"vite": "^5.0.0",
41+
"vite-plugin-ruby": "^5.0.0",
42+
"vite-plugin-vue2-svg": "^0.4.0",
43+
"vitest": "^0.34.6",
44+
"vue-template-compiler": "^2.7.15"
4345
},
4446
"resolutions": {
4547
"prosemirror-model": "^1.11.2",

Diff for: postcss.config.js renamed to postcss.config.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
plugins: {
33
tailwindcss: {},
4-
autoprefixer: {},
4+
autoprefixer: {}
55
}
66
}

0 commit comments

Comments
 (0)