create-quasar 2.2.1 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/app/quasar-v2/js-vite-2/BASE/quasar.config.js +20 -9
- package/templates/app/quasar-v2/js-vite-2/BASE/src/router/index.js +1 -1
- package/templates/app/quasar-v2/js-vite-2/eslint/_eslint.config.js +8 -3
- package/templates/app/quasar-v2/js-webpack-4/BASE/quasar.config.js +6 -2
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/router/index.js +1 -1
- package/templates/app/quasar-v2/js-webpack-4/eslint/_eslint.config.js +8 -3
- package/templates/app/quasar-v2/ts-vite-2/BASE/quasar.config.ts +20 -9
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/router/index.ts +1 -1
- package/templates/app/quasar-v2/ts-vite-2/eslint/_eslint.config.js +8 -3
- package/templates/app/quasar-v2/ts-webpack-4/BASE/quasar.config.ts +8 -3
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/router/index.ts +1 -1
- package/templates/app/quasar-v2/ts-webpack-4/eslint/_eslint.config.js +8 -3
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Configuration for your app
|
|
2
2
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file
|
|
3
3
|
|
|
4
|
-
import { defineConfig } from '#q-app/wrappers'
|
|
5
|
-
|
|
4
|
+
import { defineConfig } from '#q-app/wrappers'
|
|
5
|
+
<% if (scope.preset.i18n) { %>
|
|
6
|
+
import { fileURLToPath } from 'node:url'
|
|
7
|
+
<% } %>
|
|
6
8
|
|
|
7
9
|
export default defineConfig((<% if (scope.preset.i18n) { %>ctx<% } else { %>/* ctx */<% } %>) => {
|
|
8
10
|
return {
|
|
@@ -13,7 +15,9 @@ export default defineConfig((<% if (scope.preset.i18n) { %>ctx<% } else { %>/* c
|
|
|
13
15
|
// --> boot files are part of "main.js"
|
|
14
16
|
// https://v2.quasar.dev/quasar-cli-vite/boot-files
|
|
15
17
|
boot: [
|
|
16
|
-
|
|
18
|
+
<% if (scope.preset.i18n) { %>
|
|
19
|
+
'i18n'
|
|
20
|
+
<% } %>
|
|
17
21
|
],
|
|
18
22
|
|
|
19
23
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#css
|
|
@@ -60,8 +64,10 @@ export default defineConfig((<% if (scope.preset.i18n) { %>ctx<% } else { %>/* c
|
|
|
60
64
|
|
|
61
65
|
// extendViteConf (viteConf) {},
|
|
62
66
|
// viteVuePluginOptions: {},
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
|
|
68
|
+
<% if (scope.preset.i18n || scope.preset.eslint) { %>
|
|
69
|
+
vitePlugins: [
|
|
70
|
+
<% if (scope.preset.i18n) { %>
|
|
65
71
|
['@intlify/unplugin-vue-i18n/vite', {
|
|
66
72
|
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
|
|
67
73
|
// compositionOnly: false,
|
|
@@ -74,18 +80,23 @@ export default defineConfig((<% if (scope.preset.i18n) { %>ctx<% } else { %>/* c
|
|
|
74
80
|
|
|
75
81
|
// you need to set i18n resource including paths !
|
|
76
82
|
include: [ fileURLToPath(new URL('./src/i18n', import.meta.url)) ]
|
|
77
|
-
}]<%
|
|
83
|
+
}]<% if (scope.preset.eslint) { %>,<% } %>
|
|
84
|
+
|
|
78
85
|
<% } %>
|
|
86
|
+
<% if (scope.preset.eslint) { %>
|
|
79
87
|
['vite-plugin-checker', {
|
|
80
88
|
eslint: {
|
|
81
89
|
lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{js,mjs,cjs,vue}"',
|
|
82
90
|
useFlatConfig: true
|
|
83
91
|
}
|
|
84
|
-
}, { server: false }]
|
|
85
|
-
|
|
92
|
+
}, { server: false }]
|
|
93
|
+
<% } %>
|
|
94
|
+
]
|
|
95
|
+
<% } else { %>
|
|
86
96
|
// vitePlugins: [
|
|
87
97
|
// [ 'package-name', { ..pluginOptions.. }, { server: true, client: true } ]
|
|
88
|
-
// ]
|
|
98
|
+
// ]
|
|
99
|
+
<% } %>
|
|
89
100
|
},
|
|
90
101
|
|
|
91
102
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#devserver
|
|
@@ -11,7 +11,7 @@ import routes from './routes'
|
|
|
11
11
|
* with the Router instance.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
export default defineRouter(
|
|
14
|
+
export default defineRouter((/* { store, ssrContext } */) => {
|
|
15
15
|
const createHistory = process.env.SERVER
|
|
16
16
|
? createMemoryHistory
|
|
17
17
|
: (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory)
|
|
@@ -2,7 +2,9 @@ import js from '@eslint/js'
|
|
|
2
2
|
import globals from 'globals'
|
|
3
3
|
import pluginVue from 'eslint-plugin-vue'
|
|
4
4
|
import pluginQuasar from '@quasar/app-vite/eslint'
|
|
5
|
-
<% if (scope.prettier) { %>
|
|
5
|
+
<% if (scope.prettier) { %>
|
|
6
|
+
import prettierSkipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
|
7
|
+
<% } %>
|
|
6
8
|
|
|
7
9
|
export default [
|
|
8
10
|
{
|
|
@@ -67,7 +69,10 @@ export default [
|
|
|
67
69
|
...globals.serviceworker
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
|
-
}<% if (scope.prettier) {
|
|
72
|
+
}<% if (scope.prettier) { %>,<% } %>
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
<% if (scope.prettier) { %>
|
|
75
|
+
|
|
76
|
+
prettierSkipFormatting
|
|
77
|
+
<% } %>
|
|
73
78
|
]
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
import { defineConfig } from '#q-app/wrappers'
|
|
5
5
|
|
|
6
6
|
export default defineConfig((ctx) => {
|
|
7
|
-
return {
|
|
7
|
+
return {
|
|
8
|
+
<% if (scope.preset.eslint) { %>
|
|
8
9
|
eslint: {
|
|
9
10
|
// fix: true,
|
|
10
11
|
// include: [],
|
|
@@ -15,6 +16,7 @@ export default defineConfig((ctx) => {
|
|
|
15
16
|
warnings: true,
|
|
16
17
|
errors: true
|
|
17
18
|
},
|
|
19
|
+
|
|
18
20
|
<% } %>
|
|
19
21
|
// https://v2.quasar.dev/quasar-cli-webpack/prefetch-feature
|
|
20
22
|
// preFetch: true,
|
|
@@ -23,7 +25,9 @@ export default defineConfig((ctx) => {
|
|
|
23
25
|
// --> boot files are part of "main.js"
|
|
24
26
|
// https://v2.quasar.dev/quasar-cli-webpack/boot-files
|
|
25
27
|
boot: [
|
|
26
|
-
|
|
28
|
+
<% if (scope.preset.i18n) { %>
|
|
29
|
+
'i18n'
|
|
30
|
+
<% } %>
|
|
27
31
|
],
|
|
28
32
|
|
|
29
33
|
// https://v2.quasar.dev/quasar-cli-webpack/quasar-config-file#css
|
|
@@ -11,7 +11,7 @@ import routes from './routes.js'
|
|
|
11
11
|
* with the Router instance.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
export default defineRouter(
|
|
14
|
+
export default defineRouter((/* { store, ssrContext } */) => {
|
|
15
15
|
const createHistory = process.env.SERVER
|
|
16
16
|
? createMemoryHistory
|
|
17
17
|
: (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory)
|
|
@@ -2,7 +2,9 @@ import js from '@eslint/js'
|
|
|
2
2
|
import globals from 'globals'
|
|
3
3
|
import pluginVue from 'eslint-plugin-vue'
|
|
4
4
|
import pluginQuasar from '@quasar/app-webpack/eslint'
|
|
5
|
-
<% if (scope.prettier) { %>
|
|
5
|
+
<% if (scope.prettier) { %>
|
|
6
|
+
import prettierSkipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
|
7
|
+
<% } %>
|
|
6
8
|
|
|
7
9
|
export default [
|
|
8
10
|
{
|
|
@@ -67,7 +69,10 @@ export default [
|
|
|
67
69
|
...globals.serviceworker
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
|
-
}<% if (scope.prettier) {
|
|
72
|
+
}<% if (scope.prettier) { %>,<% } %>
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
<% if (scope.prettier) { %>
|
|
75
|
+
|
|
76
|
+
prettierSkipFormatting
|
|
77
|
+
<% } %>
|
|
73
78
|
]
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Configuration for your app
|
|
2
2
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file
|
|
3
3
|
|
|
4
|
-
import { defineConfig } from '#q-app/wrappers'
|
|
5
|
-
|
|
4
|
+
import { defineConfig } from '#q-app/wrappers';
|
|
5
|
+
<% if (scope.preset.i18n) { %>
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
<% } %>
|
|
6
8
|
|
|
7
9
|
export default defineConfig((<% if (scope.preset.i18n) { %>ctx<% } else { %>/* ctx */<% } %>) => {
|
|
8
10
|
return {
|
|
@@ -13,7 +15,9 @@ export default defineConfig((<% if (scope.preset.i18n) { %>ctx<% } else { %>/* c
|
|
|
13
15
|
// --> boot files are part of "main.js"
|
|
14
16
|
// https://v2.quasar.dev/quasar-cli-vite/boot-files
|
|
15
17
|
boot: [
|
|
16
|
-
|
|
18
|
+
<% if (scope.preset.i18n) { %>
|
|
19
|
+
'i18n'
|
|
20
|
+
<% } %>
|
|
17
21
|
],
|
|
18
22
|
|
|
19
23
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#css
|
|
@@ -66,8 +70,10 @@ export default defineConfig((<% if (scope.preset.i18n) { %>ctx<% } else { %>/* c
|
|
|
66
70
|
|
|
67
71
|
// extendViteConf (viteConf) {},
|
|
68
72
|
// viteVuePluginOptions: {},
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
|
|
74
|
+
<% if (scope.preset.i18n || scope.preset.eslint) { %>
|
|
75
|
+
vitePlugins: [
|
|
76
|
+
<% if (scope.preset.i18n) { %>
|
|
71
77
|
['@intlify/unplugin-vue-i18n/vite', {
|
|
72
78
|
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
|
|
73
79
|
// compositionOnly: false,
|
|
@@ -80,19 +86,24 @@ export default defineConfig((<% if (scope.preset.i18n) { %>ctx<% } else { %>/* c
|
|
|
80
86
|
|
|
81
87
|
// you need to set i18n resource including paths !
|
|
82
88
|
include: [ fileURLToPath(new URL('./src/i18n', import.meta.url)) ]
|
|
83
|
-
}]<%
|
|
89
|
+
}]<% if (scope.preset.eslint) { %>,<% } %>
|
|
90
|
+
|
|
84
91
|
<% } %>
|
|
92
|
+
<% if (scope.preset.eslint) { %>
|
|
85
93
|
['vite-plugin-checker', {
|
|
86
94
|
vueTsc: true,
|
|
87
95
|
eslint: {
|
|
88
96
|
lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{ts,js,mjs,cjs,vue}"',
|
|
89
97
|
useFlatConfig: true
|
|
90
98
|
}
|
|
91
|
-
}, { server: false }]
|
|
92
|
-
|
|
99
|
+
}, { server: false }]
|
|
100
|
+
<% } %>
|
|
101
|
+
]
|
|
102
|
+
<% } else { %>
|
|
93
103
|
// vitePlugins: [
|
|
94
104
|
// [ 'package-name', { ..pluginOptions.. }, { server: true, client: true } ]
|
|
95
|
-
// ]
|
|
105
|
+
// ]
|
|
106
|
+
<% } %>
|
|
96
107
|
},
|
|
97
108
|
|
|
98
109
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#devserver
|
|
@@ -16,7 +16,7 @@ import routes from './routes';
|
|
|
16
16
|
* with the Router instance.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
export default defineRouter(
|
|
19
|
+
export default defineRouter((/* { store, ssrContext } */) => {
|
|
20
20
|
const createHistory = process.env.SERVER
|
|
21
21
|
? createMemoryHistory
|
|
22
22
|
: (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory);
|
|
@@ -3,7 +3,9 @@ import globals from 'globals'
|
|
|
3
3
|
import pluginVue from 'eslint-plugin-vue'
|
|
4
4
|
import pluginQuasar from '@quasar/app-vite/eslint'
|
|
5
5
|
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
|
6
|
-
<% if (scope.prettier) { %>
|
|
6
|
+
<% if (scope.prettier) { %>
|
|
7
|
+
import prettierSkipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
|
8
|
+
<% } %>
|
|
7
9
|
|
|
8
10
|
export default defineConfigWithVueTs(
|
|
9
11
|
{
|
|
@@ -80,7 +82,10 @@ export default defineConfigWithVueTs(
|
|
|
80
82
|
...globals.serviceworker
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
|
-
}<% if (scope.prettier) {
|
|
85
|
+
}<% if (scope.prettier) { %>,<% } %>
|
|
84
86
|
|
|
85
|
-
|
|
87
|
+
<% if (scope.prettier) { %>
|
|
88
|
+
|
|
89
|
+
prettierSkipFormatting
|
|
90
|
+
<% } %>
|
|
86
91
|
)
|
|
@@ -8,7 +8,8 @@ import { defineConfig } from '#q-app/wrappers';
|
|
|
8
8
|
|
|
9
9
|
export default defineConfig((/* ctx */) => {
|
|
10
10
|
return {
|
|
11
|
-
|
|
11
|
+
<% if (scope.preset.eslint) { %>
|
|
12
|
+
eslint: {
|
|
12
13
|
// fix: true,
|
|
13
14
|
// include: [],
|
|
14
15
|
// exclude: [],
|
|
@@ -17,7 +18,9 @@ export default defineConfig((/* ctx */) => {
|
|
|
17
18
|
// rawWebpackEslintPluginOptions: {},
|
|
18
19
|
warnings: true,
|
|
19
20
|
errors: true
|
|
20
|
-
}
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
<% } %>
|
|
21
24
|
// https://v2.quasar.dev/quasar-cli-webpack/prefetch-feature
|
|
22
25
|
// preFetch: true,
|
|
23
26
|
|
|
@@ -25,7 +28,9 @@ export default defineConfig((/* ctx */) => {
|
|
|
25
28
|
// --> boot files are part of "main.js"
|
|
26
29
|
// https://v2.quasar.dev/quasar-cli-webpack/boot-files
|
|
27
30
|
boot: [
|
|
28
|
-
|
|
31
|
+
<% if (scope.preset.i18n) { %>
|
|
32
|
+
'i18n'
|
|
33
|
+
<% } %>
|
|
29
34
|
],
|
|
30
35
|
|
|
31
36
|
// https://v2.quasar.dev/quasar-cli-webpack/quasar-config-file#css
|
|
@@ -16,7 +16,7 @@ import routes from './routes';
|
|
|
16
16
|
* with the Router instance.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
export default defineRouter(
|
|
19
|
+
export default defineRouter((/* { store, ssrContext } */) => {
|
|
20
20
|
const createHistory = process.env.SERVER
|
|
21
21
|
? createMemoryHistory
|
|
22
22
|
: (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory);
|
|
@@ -3,7 +3,9 @@ import globals from 'globals'
|
|
|
3
3
|
import pluginVue from 'eslint-plugin-vue'
|
|
4
4
|
import pluginQuasar from '@quasar/app-webpack/eslint'
|
|
5
5
|
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
|
6
|
-
<% if (scope.prettier) { %>
|
|
6
|
+
<% if (scope.prettier) { %>
|
|
7
|
+
import prettierSkipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
|
8
|
+
<% } %>
|
|
7
9
|
|
|
8
10
|
export default defineConfigWithVueTs(
|
|
9
11
|
{
|
|
@@ -81,7 +83,10 @@ export default defineConfigWithVueTs(
|
|
|
81
83
|
...globals.serviceworker
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
|
-
}<% if (scope.prettier) {
|
|
86
|
+
}<% if (scope.prettier) { %>,<% } %>
|
|
85
87
|
|
|
86
|
-
|
|
88
|
+
<% if (scope.prettier) { %>
|
|
89
|
+
|
|
90
|
+
prettierSkipFormatting
|
|
91
|
+
<% } %>
|
|
87
92
|
)
|