create-quasar 1.5.6 → 1.7.0
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/.eslintrc.cjs +10 -2
- package/index.js +88 -92
- package/package.json +10 -9
- package/templates/app/index.js +2 -3
- package/templates/app/quasar-v1/index.js +2 -3
- package/templates/app/quasar-v1/js/BASE/src/router/routes.js +0 -1
- package/templates/app/quasar-v1/js/index.js +8 -9
- package/templates/app/quasar-v1/js/lint/_.eslintrc.js +6 -4
- package/templates/app/quasar-v1/ts/index.js +8 -9
- package/templates/app/quasar-v1/ts/lint/_.eslintrc.js +1 -0
- package/templates/app/quasar-v2/index.js +2 -3
- package/templates/app/quasar-v2/js-vite/BASE/_package.json +2 -1
- package/templates/app/quasar-v2/js-vite/BASE/quasar.config.js +8 -12
- package/templates/app/quasar-v2/js-vite/BASE/src/router/routes.js +0 -1
- package/templates/app/quasar-v2/js-vite/index.js +12 -13
- package/templates/app/quasar-v2/js-vite/lint/_.eslintrc.cjs +2 -2
- package/templates/app/quasar-v2/js-vite-beta/BASE/_package.json +2 -1
- package/templates/app/quasar-v2/js-vite-beta/BASE/quasar.config.js +8 -13
- package/templates/app/quasar-v2/js-vite-beta/BASE/src/router/routes.js +0 -1
- package/templates/app/quasar-v2/js-vite-beta/index.js +12 -13
- package/templates/app/quasar-v2/js-vite-beta/lint/_.eslintrc.cjs +1 -1
- package/templates/app/quasar-v2/js-webpack/BASE/src/router/routes.js +0 -1
- package/templates/app/quasar-v2/js-webpack/index.js +12 -13
- package/templates/app/quasar-v2/js-webpack/lint/_.eslintrc.cjs +2 -2
- package/templates/app/quasar-v2/js-webpack-beta/BASE/_package.json +1 -1
- package/templates/app/quasar-v2/js-webpack-beta/BASE/src/router/routes.js +0 -1
- package/templates/app/quasar-v2/js-webpack-beta/index.js +12 -13
- package/templates/app/quasar-v2/js-webpack-beta/lint/_.eslintrc.cjs +2 -2
- package/templates/app/quasar-v2/ts-vite/BASE/_package.json +3 -1
- package/templates/app/quasar-v2/ts-vite/BASE/quasar.config.js +11 -12
- package/templates/app/quasar-v2/ts-vite/index.js +14 -15
- package/templates/app/quasar-v2/ts-vite/lint/_.eslintignore +0 -1
- package/templates/app/quasar-v2/ts-vite/lint/_.eslintrc.cjs +2 -2
- package/templates/app/quasar-v2/ts-vite/lint/_tsconfig.vue-tsc.json +6 -0
- package/templates/app/quasar-v2/ts-vite-beta/BASE/_package.json +4 -2
- package/templates/app/quasar-v2/ts-vite-beta/BASE/quasar.config.ts +11 -13
- package/templates/app/quasar-v2/ts-vite-beta/index.js +14 -15
- package/templates/app/quasar-v2/ts-vite-beta/lint/_.eslintignore +0 -1
- package/templates/app/quasar-v2/ts-vite-beta/lint/_.eslintrc.cjs +2 -2
- package/templates/app/quasar-v2/ts-vite-beta/lint/_tsconfig.vue-tsc.json +6 -0
- package/templates/app/quasar-v2/ts-webpack/index.js +14 -15
- package/templates/app/quasar-v2/ts-webpack/lint/_.eslintrc.cjs +2 -2
- package/templates/app/quasar-v2/ts-webpack-beta/BASE/_package.json +1 -1
- package/templates/app/quasar-v2/ts-webpack-beta/index.js +14 -15
- package/templates/app/quasar-v2/ts-webpack-beta/lint/_.eslintrc.cjs +2 -2
- package/templates/app-extension/ae-v1/index.js +7 -8
- package/templates/app-extension/index.js +2 -2
- package/templates/ui-kit/index.js +8 -9
- package/templates/ui-kit/quasar-v1/BASE/ui/build/script.app-ext.js +1 -1
- package/templates/ui-kit/quasar-v1/BASE/ui/build/script.clean.js +1 -1
- package/templates/ui-kit/quasar-v1/BASE/ui/dev/quasar.conf.js +1 -1
- package/templates/ui-kit/quasar-v1/index.js +9 -10
- package/templates/ui-kit/quasar-v2/index.js +9 -10
- package/utils/index.js +67 -46
- package/utils/logger.js +66 -43
- /package/templates/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v1/js/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v1/ts/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v2/js-vite/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v2/js-vite-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v2/js-webpack/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v2/js-webpack-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v2/ts-vite/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v2/ts-vite-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v2/ts-webpack/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v2/ts-webpack-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/app-extension/ae-v1/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/ui-kit/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/templates/ui-kit/quasar-v2/{.eslintrc.js → .eslintrc.cjs} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
module.exports = async function ({ scope, utils }) {
|
|
1
|
+
export async function script ({ scope, utils }) {
|
|
3
2
|
await utils.prompts(scope, [
|
|
4
3
|
{
|
|
5
4
|
type: 'select',
|
|
@@ -17,11 +16,11 @@ module.exports = async function ({ scope, utils }) {
|
|
|
17
16
|
name: 'preset',
|
|
18
17
|
message: 'Check the features needed for your project:',
|
|
19
18
|
choices: [
|
|
20
|
-
{ title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
|
|
19
|
+
{ title: 'Linting (vite-plugin-checker + ESLint)', value: 'lint', description: 'recommended', selected: true },
|
|
21
20
|
{ title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
|
|
22
21
|
{ title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
|
|
23
|
-
{ title: '
|
|
24
|
-
{ title: '
|
|
22
|
+
{ title: 'axios', value: 'axios' },
|
|
23
|
+
{ title: 'vue-i18n', value: 'i18n' }
|
|
25
24
|
],
|
|
26
25
|
format: values => {
|
|
27
26
|
let result = values
|
|
@@ -38,7 +37,7 @@ module.exports = async function ({ scope, utils }) {
|
|
|
38
37
|
}
|
|
39
38
|
},
|
|
40
39
|
{
|
|
41
|
-
type: (_, { preset }) => preset.lint ? 'select' : null,
|
|
40
|
+
type: (_, { preset }) => (preset.lint ? 'select' : null),
|
|
42
41
|
name: 'lintConfig',
|
|
43
42
|
message: 'Pick an ESLint preset:',
|
|
44
43
|
choices: [
|
|
@@ -50,13 +49,13 @@ module.exports = async function ({ scope, utils }) {
|
|
|
50
49
|
])
|
|
51
50
|
|
|
52
51
|
utils.createTargetDir(scope)
|
|
53
|
-
utils.renderTemplate(utils.join(
|
|
54
|
-
utils.renderTemplate(utils.join(
|
|
52
|
+
utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
|
|
53
|
+
utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
|
|
55
54
|
|
|
56
|
-
if (scope.preset.axios) utils.renderTemplate(utils.join(
|
|
57
|
-
if (scope.preset.i18n) utils.renderTemplate(utils.join(
|
|
58
|
-
if (scope.preset.lint) utils.renderTemplate(utils.join(
|
|
55
|
+
if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
|
|
56
|
+
if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
|
|
57
|
+
if (scope.preset.lint) utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
|
|
59
58
|
|
|
60
|
-
if (scope.preset.pinia) utils.renderTemplate(utils.join(
|
|
61
|
-
else if (scope.preset.vuex) utils.renderTemplate(utils.join(
|
|
59
|
+
if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
|
|
60
|
+
else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
|
|
62
61
|
}
|
|
@@ -11,7 +11,6 @@ module.exports = {
|
|
|
11
11
|
env: {
|
|
12
12
|
node: true,
|
|
13
13
|
browser: true,
|
|
14
|
-
'vue/setup-compiler-macros': true
|
|
15
14
|
},
|
|
16
15
|
|
|
17
16
|
// Rules order is important, please avoid shuffling them
|
|
@@ -77,6 +76,7 @@ module.exports = {
|
|
|
77
76
|
'import/no-unresolved': 'off',
|
|
78
77
|
'import/no-extraneous-dependencies': 'off',
|
|
79
78
|
<% } else if (lintConfig === 'airbnb') { %>
|
|
79
|
+
'no-plusplus': 'off',
|
|
80
80
|
'no-param-reassign': 'off',
|
|
81
81
|
'no-void': 'off',
|
|
82
82
|
'no-nested-ternary': 'off',
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
module.exports = async function ({ scope, utils }) {
|
|
1
|
+
export async function script ({ scope, utils }) {
|
|
3
2
|
await utils.prompts(scope, [
|
|
4
3
|
{
|
|
5
4
|
type: 'select',
|
|
@@ -17,11 +16,11 @@ module.exports = async function ({ scope, utils }) {
|
|
|
17
16
|
name: 'preset',
|
|
18
17
|
message: 'Check the features needed for your project:',
|
|
19
18
|
choices: [
|
|
20
|
-
{ title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
|
|
19
|
+
{ title: 'Linting (ESLint)', value: 'lint', description: 'recommended', selected: true },
|
|
21
20
|
{ title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
|
|
22
21
|
{ title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
|
|
23
|
-
{ title: '
|
|
24
|
-
{ title: '
|
|
22
|
+
{ title: 'axios', value: 'axios' },
|
|
23
|
+
{ title: 'vue-i18n', value: 'i18n' }
|
|
25
24
|
],
|
|
26
25
|
format: values => {
|
|
27
26
|
let result = values
|
|
@@ -38,7 +37,7 @@ module.exports = async function ({ scope, utils }) {
|
|
|
38
37
|
}
|
|
39
38
|
},
|
|
40
39
|
{
|
|
41
|
-
type: (_, { preset }) => preset.lint ? 'select' : null,
|
|
40
|
+
type: (_, { preset }) => (preset.lint ? 'select' : null),
|
|
42
41
|
name: 'lintConfig',
|
|
43
42
|
message: 'Pick an ESLint preset:',
|
|
44
43
|
choices: [
|
|
@@ -50,13 +49,13 @@ module.exports = async function ({ scope, utils }) {
|
|
|
50
49
|
])
|
|
51
50
|
|
|
52
51
|
utils.createTargetDir(scope)
|
|
53
|
-
utils.renderTemplate(utils.join(
|
|
54
|
-
utils.renderTemplate(utils.join(
|
|
52
|
+
utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
|
|
53
|
+
utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
|
|
55
54
|
|
|
56
|
-
if (scope.preset.axios) utils.renderTemplate(utils.join(
|
|
57
|
-
if (scope.preset.i18n) utils.renderTemplate(utils.join(
|
|
58
|
-
if (scope.preset.lint) utils.renderTemplate(utils.join(
|
|
55
|
+
if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
|
|
56
|
+
if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
|
|
57
|
+
if (scope.preset.lint) utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
|
|
59
58
|
|
|
60
|
-
if (scope.preset.pinia) utils.renderTemplate(utils.join(
|
|
61
|
-
else if (scope.preset.vuex) utils.renderTemplate(utils.join(
|
|
59
|
+
if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
|
|
60
|
+
else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
|
|
62
61
|
}
|
|
@@ -11,8 +11,7 @@ module.exports = {
|
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
env: {
|
|
14
|
-
browser: true
|
|
15
|
-
'vue/setup-compiler-macros': true
|
|
14
|
+
browser: true
|
|
16
15
|
},
|
|
17
16
|
|
|
18
17
|
// Rules order is important, please avoid shuffling them
|
|
@@ -78,6 +77,7 @@ module.exports = {
|
|
|
78
77
|
'import/no-unresolved': 'off',
|
|
79
78
|
'import/no-extraneous-dependencies': 'off',
|
|
80
79
|
<% } else if (lintConfig === 'airbnb') { %>
|
|
80
|
+
'no-plusplus': 'off',
|
|
81
81
|
'no-param-reassign': 'off',
|
|
82
82
|
'no-void': 'off',
|
|
83
83
|
'no-nested-ternary': 'off',
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
module.exports = async function ({ scope, utils }) {
|
|
1
|
+
export async function script ({ scope, utils }) {
|
|
3
2
|
await utils.prompts(scope, [
|
|
4
3
|
{
|
|
5
4
|
type: 'select',
|
|
@@ -17,11 +16,11 @@ module.exports = async function ({ scope, utils }) {
|
|
|
17
16
|
name: 'preset',
|
|
18
17
|
message: 'Check the features needed for your project:',
|
|
19
18
|
choices: [
|
|
20
|
-
{ title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
|
|
19
|
+
{ title: 'Linting (ESLint)', value: 'lint', description: 'recommended', selected: true },
|
|
21
20
|
{ title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
|
|
22
21
|
{ title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
|
|
23
|
-
{ title: '
|
|
24
|
-
{ title: '
|
|
22
|
+
{ title: 'axios', value: 'axios' },
|
|
23
|
+
{ title: 'vue-i18n', value: 'i18n' }
|
|
25
24
|
],
|
|
26
25
|
format: values => {
|
|
27
26
|
let result = values
|
|
@@ -38,7 +37,7 @@ module.exports = async function ({ scope, utils }) {
|
|
|
38
37
|
}
|
|
39
38
|
},
|
|
40
39
|
{
|
|
41
|
-
type: (_, { preset }) => preset.lint ? 'select' : null,
|
|
40
|
+
type: (_, { preset }) => (preset.lint ? 'select' : null),
|
|
42
41
|
name: 'lintConfig',
|
|
43
42
|
message: 'Pick an ESLint preset:',
|
|
44
43
|
choices: [
|
|
@@ -50,13 +49,13 @@ module.exports = async function ({ scope, utils }) {
|
|
|
50
49
|
])
|
|
51
50
|
|
|
52
51
|
utils.createTargetDir(scope)
|
|
53
|
-
utils.renderTemplate(utils.join(
|
|
54
|
-
utils.renderTemplate(utils.join(
|
|
52
|
+
utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
|
|
53
|
+
utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
|
|
55
54
|
|
|
56
|
-
if (scope.preset.axios) utils.renderTemplate(utils.join(
|
|
57
|
-
if (scope.preset.i18n) utils.renderTemplate(utils.join(
|
|
58
|
-
if (scope.preset.lint) utils.renderTemplate(utils.join(
|
|
55
|
+
if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
|
|
56
|
+
if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
|
|
57
|
+
if (scope.preset.lint) utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
|
|
59
58
|
|
|
60
|
-
if (scope.preset.pinia) utils.renderTemplate(utils.join(
|
|
61
|
-
else if (scope.preset.vuex) utils.renderTemplate(utils.join(
|
|
59
|
+
if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
|
|
60
|
+
else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
|
|
62
61
|
}
|
|
@@ -11,8 +11,7 @@ module.exports = {
|
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
env: {
|
|
14
|
-
browser: true
|
|
15
|
-
'vue/setup-compiler-macros': true
|
|
14
|
+
browser: true
|
|
16
15
|
},
|
|
17
16
|
|
|
18
17
|
// Rules order is important, please avoid shuffling them
|
|
@@ -78,6 +77,7 @@ module.exports = {
|
|
|
78
77
|
'import/no-unresolved': 'off',
|
|
79
78
|
'import/no-extraneous-dependencies': 'off',
|
|
80
79
|
<% } else if (lintConfig === 'airbnb') { %>
|
|
80
|
+
'no-plusplus': 'off',
|
|
81
81
|
'no-param-reassign': 'off',
|
|
82
82
|
'no-void': 'off',
|
|
83
83
|
'no-nested-ternary': 'off',
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
<% if (preset.lint) { %>
|
|
29
29
|
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
30
30
|
"@typescript-eslint/parser": "^5.10.0",
|
|
31
|
+
"vite-plugin-checker": "^0.6.4",
|
|
32
|
+
"vue-tsc": "^1.8.22",
|
|
31
33
|
"eslint": "^8.11.0",
|
|
32
34
|
"eslint-plugin-vue": "^9.0.0",
|
|
33
35
|
<% if (lintConfig === 'standard') { %>
|
|
@@ -44,7 +46,7 @@
|
|
|
44
46
|
<% } } %>
|
|
45
47
|
"@types/node": "^12.20.21",
|
|
46
48
|
<% if (preset.i18n) { %>"@intlify/vite-plugin-vue-i18n": "^3.3.1",<% } %>
|
|
47
|
-
"@quasar/app-vite": "^1.
|
|
49
|
+
"@quasar/app-vite": "^1.8.0",
|
|
48
50
|
"autoprefixer": "^10.4.2",
|
|
49
51
|
"typescript": "^4.5.4"
|
|
50
52
|
},
|
|
@@ -16,15 +16,6 @@ const { configure } = require('quasar/wrappers');
|
|
|
16
16
|
|
|
17
17
|
module.exports = configure(function (/* ctx */) {
|
|
18
18
|
return {
|
|
19
|
-
<% if (preset.lint) { %>eslint: {
|
|
20
|
-
// fix: true,
|
|
21
|
-
// include: [],
|
|
22
|
-
// exclude: [],
|
|
23
|
-
// rawOptions: {},
|
|
24
|
-
warnings: true,
|
|
25
|
-
errors: true
|
|
26
|
-
},<% } %>
|
|
27
|
-
|
|
28
19
|
// https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
|
|
29
20
|
// preFetch: true,
|
|
30
21
|
|
|
@@ -81,7 +72,7 @@ module.exports = configure(function (/* ctx */) {
|
|
|
81
72
|
// extendViteConf (viteConf) {},
|
|
82
73
|
// viteVuePluginOptions: {},
|
|
83
74
|
|
|
84
|
-
<% if (preset.i18n) { %>vitePlugins: [
|
|
75
|
+
<% if (preset.i18n || preset.lint) { %>vitePlugins: [<% if (preset.i18n) { %>
|
|
85
76
|
['@intlify/vite-plugin-vue-i18n', {
|
|
86
77
|
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
|
|
87
78
|
// compositionOnly: false,
|
|
@@ -92,10 +83,18 @@ module.exports = configure(function (/* ctx */) {
|
|
|
92
83
|
|
|
93
84
|
// you need to set i18n resource including paths !
|
|
94
85
|
include: path.resolve(__dirname, './src/i18n/**')
|
|
95
|
-
}]
|
|
86
|
+
}]<% } %><% if (preset.lint) { %><% if (preset.i18n) { %>,<% } %>
|
|
87
|
+
['vite-plugin-checker', {
|
|
88
|
+
vueTsc: {
|
|
89
|
+
tsconfigPath: 'tsconfig.vue-tsc.json'
|
|
90
|
+
},
|
|
91
|
+
eslint: {
|
|
92
|
+
lintCommand: 'eslint "./**/*.{js,ts,mjs,cjs,vue}"'
|
|
93
|
+
}
|
|
94
|
+
}, { server: false }]<% } %>
|
|
96
95
|
]<% } else { %>
|
|
97
96
|
// vitePlugins: [
|
|
98
|
-
// [ 'package-name', { ..
|
|
97
|
+
// [ 'package-name', { ..pluginOptions.. }, { server: true, client: true } ]
|
|
99
98
|
// ]<% } %>
|
|
100
99
|
},
|
|
101
100
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
module.exports = async function ({ scope, utils }) {
|
|
1
|
+
export async function script ({ scope, utils }) {
|
|
3
2
|
await utils.prompts(scope, [
|
|
4
3
|
{
|
|
5
4
|
type: 'select',
|
|
@@ -7,8 +6,8 @@ module.exports = async function ({ scope, utils }) {
|
|
|
7
6
|
message: 'Pick a Vue component style:',
|
|
8
7
|
initial: 0,
|
|
9
8
|
choices: [
|
|
10
|
-
{ title: 'Composition API', value: 'composition', description: 'recommended' },
|
|
11
9
|
{ title: 'Composition API with <script setup>', value: 'composition-setup', description: 'recommended' },
|
|
10
|
+
{ title: 'Composition API', value: 'composition', description: 'recommended' },
|
|
12
11
|
{ title: 'Options API', value: 'options' },
|
|
13
12
|
{ title: 'Class-based', value: 'class', description: 'DEPRECATED; see https://github.com/quasarframework/quasar/discussions/11204', disabled: true }
|
|
14
13
|
]
|
|
@@ -29,11 +28,11 @@ module.exports = async function ({ scope, utils }) {
|
|
|
29
28
|
name: 'preset',
|
|
30
29
|
message: 'Check the features needed for your project:',
|
|
31
30
|
choices: [
|
|
32
|
-
{ title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
|
|
31
|
+
{ title: 'Linting (vite-plugin-checker + ESLint + vue-tsc)', value: 'lint', description: 'recommended', selected: true },
|
|
33
32
|
{ title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
|
|
34
33
|
{ title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
|
|
35
|
-
{ title: '
|
|
36
|
-
{ title: '
|
|
34
|
+
{ title: 'axios', value: 'axios' },
|
|
35
|
+
{ title: 'vue-i18n', value: 'i18n' }
|
|
37
36
|
],
|
|
38
37
|
format: values => {
|
|
39
38
|
let result = values
|
|
@@ -50,7 +49,7 @@ module.exports = async function ({ scope, utils }) {
|
|
|
50
49
|
}
|
|
51
50
|
},
|
|
52
51
|
{
|
|
53
|
-
type: (_, { preset }) => preset.lint ? 'select' : null,
|
|
52
|
+
type: (_, { preset }) => (preset.lint ? 'select' : null),
|
|
54
53
|
name: 'lintConfig',
|
|
55
54
|
message: 'Pick an ESLint preset:',
|
|
56
55
|
choices: [
|
|
@@ -62,18 +61,18 @@ module.exports = async function ({ scope, utils }) {
|
|
|
62
61
|
])
|
|
63
62
|
|
|
64
63
|
utils.createTargetDir(scope)
|
|
65
|
-
utils.renderTemplate(utils.join(
|
|
66
|
-
utils.renderTemplate(utils.join(
|
|
64
|
+
utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
|
|
65
|
+
utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
|
|
67
66
|
|
|
68
|
-
if (scope.preset.axios) utils.renderTemplate(utils.join(
|
|
69
|
-
if (scope.preset.i18n) utils.renderTemplate(utils.join(
|
|
67
|
+
if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
|
|
68
|
+
if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
|
|
70
69
|
if (scope.preset.lint) {
|
|
71
|
-
utils.renderTemplate(utils.join(
|
|
70
|
+
utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
|
|
72
71
|
if (scope.lintConfig === 'prettier') {
|
|
73
|
-
utils.renderTemplate(utils.join(
|
|
72
|
+
utils.renderTemplate(utils.join(import.meta.url, 'prettier'), scope)
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
if (scope.preset.pinia) utils.renderTemplate(utils.join(
|
|
78
|
-
else if (scope.preset.vuex) utils.renderTemplate(utils.join(
|
|
76
|
+
if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
|
|
77
|
+
else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
|
|
79
78
|
}
|
|
@@ -15,8 +15,7 @@ module.exports = {
|
|
|
15
15
|
env: {
|
|
16
16
|
browser: true,
|
|
17
17
|
es2021: true,
|
|
18
|
-
node: true
|
|
19
|
-
'vue/setup-compiler-macros': true
|
|
18
|
+
node: true
|
|
20
19
|
},
|
|
21
20
|
|
|
22
21
|
// Rules order is important, please avoid shuffling them
|
|
@@ -92,6 +91,7 @@ module.exports = {
|
|
|
92
91
|
// does not work with type definitions
|
|
93
92
|
'import/named': 'off',
|
|
94
93
|
<% } else if (lintConfig === 'airbnb') { %>
|
|
94
|
+
'no-plusplus': 'off',
|
|
95
95
|
'no-param-reassign': 'off',
|
|
96
96
|
'no-void': 'off',
|
|
97
97
|
'no-nested-ternary': 'off',
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
<% if (preset.lint) { %>
|
|
30
30
|
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
|
31
31
|
"@typescript-eslint/parser": "^6.6.0",
|
|
32
|
+
"vite-plugin-checker": "^0.6.4",
|
|
33
|
+
"vue-tsc": "^1.8.22",
|
|
32
34
|
"eslint": "^8.11.0",
|
|
33
35
|
"eslint-plugin-vue": "^9.0.0",
|
|
34
36
|
<% if (lintConfig === 'standard') { %>
|
|
@@ -45,9 +47,9 @@
|
|
|
45
47
|
<% } } %>
|
|
46
48
|
"@types/node": "^20.5.9",
|
|
47
49
|
<% if (preset.i18n) { %>"@intlify/unplugin-vue-i18n": "^2.0.0",<% } %>
|
|
48
|
-
"@quasar/app-vite": "^2.0.0-beta.
|
|
50
|
+
"@quasar/app-vite": "^2.0.0-beta.5",
|
|
49
51
|
"autoprefixer": "^10.4.2",
|
|
50
|
-
"typescript": "
|
|
52
|
+
"typescript": "~5.3.0"
|
|
51
53
|
},
|
|
52
54
|
"engines": {
|
|
53
55
|
"node": "^24 || ^22 || ^20 || ^18",
|
|
@@ -11,16 +11,6 @@ import { configure } from 'quasar/wrappers';
|
|
|
11
11
|
|
|
12
12
|
export default configure((<% if (preset.i18n) { %>ctx<% } else { %>/* ctx */<% } %>) => {
|
|
13
13
|
return {
|
|
14
|
-
<% if (preset.lint) { %>eslint: {
|
|
15
|
-
// fix: true,
|
|
16
|
-
// include: [],
|
|
17
|
-
// exclude: [],
|
|
18
|
-
// cache: false,
|
|
19
|
-
// rawOptions: {},
|
|
20
|
-
warnings: true,
|
|
21
|
-
errors: true
|
|
22
|
-
},<% } %>
|
|
23
|
-
|
|
24
14
|
// https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
|
|
25
15
|
// preFetch: true,
|
|
26
16
|
|
|
@@ -77,7 +67,7 @@ export default configure((<% if (preset.i18n) { %>ctx<% } else { %>/* ctx */<% }
|
|
|
77
67
|
// extendViteConf (viteConf) {},
|
|
78
68
|
// viteVuePluginOptions: {},
|
|
79
69
|
|
|
80
|
-
<% if (preset.i18n) { %>vitePlugins: [
|
|
70
|
+
<% if (preset.i18n || preset.lint) { %>vitePlugins: [<% if (preset.i18n) { %>
|
|
81
71
|
['@intlify/unplugin-vue-i18n/vite', {
|
|
82
72
|
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
|
|
83
73
|
// compositionOnly: false,
|
|
@@ -90,10 +80,18 @@ export default configure((<% if (preset.i18n) { %>ctx<% } else { %>/* ctx */<% }
|
|
|
90
80
|
|
|
91
81
|
// you need to set i18n resource including paths !
|
|
92
82
|
include: [ fileURLToPath(new URL('./src/i18n', import.meta.url)) ],
|
|
93
|
-
}]
|
|
83
|
+
}]<% } %><% if (preset.lint) { %><% if (preset.i18n) { %>,<% } %>
|
|
84
|
+
['vite-plugin-checker', {
|
|
85
|
+
vueTsc: {
|
|
86
|
+
tsconfigPath: 'tsconfig.vue-tsc.json'
|
|
87
|
+
},
|
|
88
|
+
eslint: {
|
|
89
|
+
lintCommand: 'eslint "./**/*.{js,ts,mjs,cjs,vue}"'
|
|
90
|
+
}
|
|
91
|
+
}, { server: false }]<% } %>
|
|
94
92
|
]<% } else { %>
|
|
95
93
|
// vitePlugins: [
|
|
96
|
-
// [ 'package-name', { ..
|
|
94
|
+
// [ 'package-name', { ..pluginOptions.. }, { server: true, client: true } ]
|
|
97
95
|
// ]<% } %>
|
|
98
96
|
},
|
|
99
97
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
module.exports = async function ({ scope, utils }) {
|
|
1
|
+
export async function script ({ scope, utils }) {
|
|
3
2
|
await utils.prompts(scope, [
|
|
4
3
|
{
|
|
5
4
|
type: 'select',
|
|
@@ -7,8 +6,8 @@ module.exports = async function ({ scope, utils }) {
|
|
|
7
6
|
message: 'Pick a Vue component style:',
|
|
8
7
|
initial: 0,
|
|
9
8
|
choices: [
|
|
10
|
-
{ title: 'Composition API', value: 'composition', description: 'recommended' },
|
|
11
9
|
{ title: 'Composition API with <script setup>', value: 'composition-setup', description: 'recommended' },
|
|
10
|
+
{ title: 'Composition API', value: 'composition', description: 'recommended' },
|
|
12
11
|
{ title: 'Options API', value: 'options' },
|
|
13
12
|
{ title: 'Class-based', value: 'class', description: 'DEPRECATED; see https://github.com/quasarframework/quasar/discussions/11204', disabled: true }
|
|
14
13
|
]
|
|
@@ -29,11 +28,11 @@ module.exports = async function ({ scope, utils }) {
|
|
|
29
28
|
name: 'preset',
|
|
30
29
|
message: 'Check the features needed for your project:',
|
|
31
30
|
choices: [
|
|
32
|
-
{ title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
|
|
31
|
+
{ title: 'Linting (vite-plugin-checker + ESLint + vue-tsc)', value: 'lint', description: 'recommended', selected: true },
|
|
33
32
|
{ title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
|
|
34
33
|
{ title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
|
|
35
|
-
{ title: '
|
|
36
|
-
{ title: '
|
|
34
|
+
{ title: 'axios', value: 'axios' },
|
|
35
|
+
{ title: 'vue-i18n', value: 'i18n' }
|
|
37
36
|
],
|
|
38
37
|
format: values => {
|
|
39
38
|
let result = values
|
|
@@ -50,7 +49,7 @@ module.exports = async function ({ scope, utils }) {
|
|
|
50
49
|
}
|
|
51
50
|
},
|
|
52
51
|
{
|
|
53
|
-
type: (_, { preset }) => preset.lint ? 'select' : null,
|
|
52
|
+
type: (_, { preset }) => (preset.lint ? 'select' : null),
|
|
54
53
|
name: 'lintConfig',
|
|
55
54
|
message: 'Pick an ESLint preset:',
|
|
56
55
|
choices: [
|
|
@@ -62,18 +61,18 @@ module.exports = async function ({ scope, utils }) {
|
|
|
62
61
|
])
|
|
63
62
|
|
|
64
63
|
utils.createTargetDir(scope)
|
|
65
|
-
utils.renderTemplate(utils.join(
|
|
66
|
-
utils.renderTemplate(utils.join(
|
|
64
|
+
utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
|
|
65
|
+
utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
|
|
67
66
|
|
|
68
|
-
if (scope.preset.axios) utils.renderTemplate(utils.join(
|
|
69
|
-
if (scope.preset.i18n) utils.renderTemplate(utils.join(
|
|
67
|
+
if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
|
|
68
|
+
if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
|
|
70
69
|
if (scope.preset.lint) {
|
|
71
|
-
utils.renderTemplate(utils.join(
|
|
70
|
+
utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
|
|
72
71
|
if (scope.lintConfig === 'prettier') {
|
|
73
|
-
utils.renderTemplate(utils.join(
|
|
72
|
+
utils.renderTemplate(utils.join(import.meta.url, 'prettier'), scope)
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
if (scope.preset.pinia) utils.renderTemplate(utils.join(
|
|
78
|
-
else if (scope.preset.vuex) utils.renderTemplate(utils.join(
|
|
76
|
+
if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
|
|
77
|
+
else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
|
|
79
78
|
}
|
|
@@ -15,8 +15,7 @@ module.exports = {
|
|
|
15
15
|
env: {
|
|
16
16
|
browser: true,
|
|
17
17
|
es2021: true,
|
|
18
|
-
node: true
|
|
19
|
-
'vue/setup-compiler-macros': true
|
|
18
|
+
node: true
|
|
20
19
|
},
|
|
21
20
|
|
|
22
21
|
// Rules order is important, please avoid shuffling them
|
|
@@ -92,6 +91,7 @@ module.exports = {
|
|
|
92
91
|
// does not work with type definitions
|
|
93
92
|
'import/named': 'off',
|
|
94
93
|
<% } else if (lintConfig === 'airbnb') { %>
|
|
94
|
+
'no-plusplus': 'off',
|
|
95
95
|
'no-param-reassign': 'off',
|
|
96
96
|
'no-void': 'off',
|
|
97
97
|
'no-nested-ternary': 'off',
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
module.exports = async function ({ scope, utils }) {
|
|
1
|
+
export async function script ({ scope, utils }) {
|
|
3
2
|
await utils.prompts(scope, [
|
|
4
3
|
{
|
|
5
4
|
type: 'select',
|
|
@@ -7,8 +6,8 @@ module.exports = async function ({ scope, utils }) {
|
|
|
7
6
|
message: 'Pick a Vue component style:',
|
|
8
7
|
initial: 0,
|
|
9
8
|
choices: [
|
|
10
|
-
{ title: 'Composition API', value: 'composition', description: 'recommended' },
|
|
11
9
|
{ title: 'Composition API with <script setup>', value: 'composition-setup', description: 'recommended' },
|
|
10
|
+
{ title: 'Composition API', value: 'composition', description: 'recommended' },
|
|
12
11
|
{ title: 'Options API', value: 'options' },
|
|
13
12
|
{ title: 'Class-based (DEPRECATED; see https://github.com/quasarframework/quasar/discussions/11204)', value: 'class', disabled: true }
|
|
14
13
|
]
|
|
@@ -29,11 +28,11 @@ module.exports = async function ({ scope, utils }) {
|
|
|
29
28
|
name: 'preset',
|
|
30
29
|
message: 'Check the features needed for your project:',
|
|
31
30
|
choices: [
|
|
32
|
-
{ title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
|
|
31
|
+
{ title: 'Linting (ESLint)', value: 'lint', description: 'recommended', selected: true },
|
|
33
32
|
{ title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
|
|
34
33
|
{ title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
|
|
35
|
-
{ title: '
|
|
36
|
-
{ title: '
|
|
34
|
+
{ title: 'axios', value: 'axios' },
|
|
35
|
+
{ title: 'vue-i18n', value: 'i18n' }
|
|
37
36
|
],
|
|
38
37
|
format: values => {
|
|
39
38
|
let result = values
|
|
@@ -50,7 +49,7 @@ module.exports = async function ({ scope, utils }) {
|
|
|
50
49
|
}
|
|
51
50
|
},
|
|
52
51
|
{
|
|
53
|
-
type: (_, { preset }) => preset.lint ? 'select' : null,
|
|
52
|
+
type: (_, { preset }) => (preset.lint ? 'select' : null),
|
|
54
53
|
name: 'lintConfig',
|
|
55
54
|
message: 'Pick an ESLint preset:',
|
|
56
55
|
choices: [
|
|
@@ -62,18 +61,18 @@ module.exports = async function ({ scope, utils }) {
|
|
|
62
61
|
])
|
|
63
62
|
|
|
64
63
|
utils.createTargetDir(scope)
|
|
65
|
-
utils.renderTemplate(utils.join(
|
|
66
|
-
utils.renderTemplate(utils.join(
|
|
64
|
+
utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
|
|
65
|
+
utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
|
|
67
66
|
|
|
68
|
-
if (scope.preset.axios) utils.renderTemplate(utils.join(
|
|
69
|
-
if (scope.preset.i18n) utils.renderTemplate(utils.join(
|
|
67
|
+
if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
|
|
68
|
+
if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
|
|
70
69
|
if (scope.preset.lint) {
|
|
71
|
-
utils.renderTemplate(utils.join(
|
|
70
|
+
utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
|
|
72
71
|
if (scope.lintConfig === 'prettier') {
|
|
73
|
-
utils.renderTemplate(utils.join(
|
|
72
|
+
utils.renderTemplate(utils.join(import.meta.url, 'prettier'), scope)
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
if (scope.preset.pinia) utils.renderTemplate(utils.join(
|
|
78
|
-
else if (scope.preset.vuex) utils.renderTemplate(utils.join(
|
|
76
|
+
if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
|
|
77
|
+
else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
|
|
79
78
|
}
|