create-quasar 1.5.5 → 1.6.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.
Files changed (61) hide show
  1. package/.eslintrc.cjs +10 -2
  2. package/index.js +88 -92
  3. package/package.json +10 -9
  4. package/templates/app/index.js +2 -3
  5. package/templates/app/quasar-v1/index.js +2 -3
  6. package/templates/app/quasar-v1/js/BASE/src/router/routes.js +0 -1
  7. package/templates/app/quasar-v1/js/index.js +8 -9
  8. package/templates/app/quasar-v1/js/lint/_.eslintrc.js +6 -4
  9. package/templates/app/quasar-v1/ts/index.js +8 -9
  10. package/templates/app/quasar-v1/ts/lint/_.eslintrc.js +1 -0
  11. package/templates/app/quasar-v2/index.js +2 -3
  12. package/templates/app/quasar-v2/js-vite/BASE/src/router/routes.js +0 -1
  13. package/templates/app/quasar-v2/js-vite/index.js +9 -10
  14. package/templates/app/quasar-v2/js-vite/lint/_.eslintrc.cjs +1 -0
  15. package/templates/app/quasar-v2/js-vite-beta/BASE/quasar.config.js +1 -1
  16. package/templates/app/quasar-v2/js-vite-beta/BASE/src/router/routes.js +0 -1
  17. package/templates/app/quasar-v2/js-vite-beta/index.js +9 -10
  18. package/templates/app/quasar-v2/js-vite-beta/lint/_.eslintrc.cjs +1 -0
  19. package/templates/app/quasar-v2/js-webpack/BASE/src/router/routes.js +0 -1
  20. package/templates/app/quasar-v2/js-webpack/index.js +9 -10
  21. package/templates/app/quasar-v2/js-webpack/lint/_.eslintrc.cjs +1 -0
  22. package/templates/app/quasar-v2/js-webpack-beta/BASE/_package.json +1 -1
  23. package/templates/app/quasar-v2/js-webpack-beta/BASE/quasar.config.js +5 -5
  24. package/templates/app/quasar-v2/js-webpack-beta/BASE/src/router/routes.js +0 -1
  25. package/templates/app/quasar-v2/js-webpack-beta/index.js +9 -10
  26. package/templates/app/quasar-v2/js-webpack-beta/lint/_.eslintrc.cjs +1 -0
  27. package/templates/app/quasar-v2/ts-vite/index.js +10 -11
  28. package/templates/app/quasar-v2/ts-vite/lint/_.eslintrc.cjs +1 -0
  29. package/templates/app/quasar-v2/ts-vite-beta/BASE/quasar.config.ts +1 -1
  30. package/templates/app/quasar-v2/ts-vite-beta/index.js +10 -11
  31. package/templates/app/quasar-v2/ts-vite-beta/lint/_.eslintrc.cjs +1 -0
  32. package/templates/app/quasar-v2/ts-webpack/index.js +10 -11
  33. package/templates/app/quasar-v2/ts-webpack/lint/_.eslintrc.cjs +1 -0
  34. package/templates/app/quasar-v2/ts-webpack-beta/BASE/_package.json +1 -1
  35. package/templates/app/quasar-v2/ts-webpack-beta/BASE/quasar.config.ts +5 -0
  36. package/templates/app/quasar-v2/ts-webpack-beta/index.js +10 -11
  37. package/templates/app/quasar-v2/ts-webpack-beta/lint/_.eslintrc.cjs +1 -0
  38. package/templates/app-extension/ae-v1/index.js +7 -8
  39. package/templates/app-extension/index.js +2 -2
  40. package/templates/ui-kit/index.js +8 -9
  41. package/templates/ui-kit/quasar-v1/BASE/ui/build/script.app-ext.js +1 -1
  42. package/templates/ui-kit/quasar-v1/BASE/ui/build/script.clean.js +1 -1
  43. package/templates/ui-kit/quasar-v1/BASE/ui/dev/quasar.conf.js +1 -1
  44. package/templates/ui-kit/quasar-v1/index.js +9 -10
  45. package/templates/ui-kit/quasar-v2/index.js +9 -10
  46. package/utils/index.js +67 -46
  47. package/utils/logger.js +66 -43
  48. /package/templates/{.eslintrc.js → .eslintrc.cjs} +0 -0
  49. /package/templates/app/quasar-v1/js/{.eslintrc.js → .eslintrc.cjs} +0 -0
  50. /package/templates/app/quasar-v1/ts/{.eslintrc.js → .eslintrc.cjs} +0 -0
  51. /package/templates/app/quasar-v2/js-vite/{.eslintrc.js → .eslintrc.cjs} +0 -0
  52. /package/templates/app/quasar-v2/js-vite-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
  53. /package/templates/app/quasar-v2/js-webpack/{.eslintrc.js → .eslintrc.cjs} +0 -0
  54. /package/templates/app/quasar-v2/js-webpack-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
  55. /package/templates/app/quasar-v2/ts-vite/{.eslintrc.js → .eslintrc.cjs} +0 -0
  56. /package/templates/app/quasar-v2/ts-vite-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
  57. /package/templates/app/quasar-v2/ts-webpack/{.eslintrc.js → .eslintrc.cjs} +0 -0
  58. /package/templates/app/quasar-v2/ts-webpack-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
  59. /package/templates/app-extension/ae-v1/{.eslintrc.js → .eslintrc.cjs} +0 -0
  60. /package/templates/ui-kit/{.eslintrc.js → .eslintrc.cjs} +0 -0
  61. /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',
@@ -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(__dirname, 'BASE'), scope)
54
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
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(__dirname, 'axios'), scope)
57
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
58
- if (scope.preset.lint) utils.renderTemplate(utils.join(__dirname, 'lint'), scope)
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(__dirname, 'pinia'), scope)
61
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
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
  }
@@ -78,6 +78,7 @@ module.exports = {
78
78
  'import/no-unresolved': 'off',
79
79
  'import/no-extraneous-dependencies': 'off',
80
80
  <% } else if (lintConfig === 'airbnb') { %>
81
+ 'no-plusplus': 'off',
81
82
  'no-param-reassign': 'off',
82
83
  'no-void': 'off',
83
84
  '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',
@@ -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(__dirname, 'BASE'), scope)
66
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
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(__dirname, 'axios'), scope)
69
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
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(__dirname, 'lint'), scope)
70
+ utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
72
71
  if (scope.lintConfig === 'prettier') {
73
- utils.renderTemplate(utils.join(__dirname, 'prettier'), scope)
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(__dirname, 'pinia'), scope)
78
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
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
  }
@@ -92,6 +92,7 @@ module.exports = {
92
92
  // does not work with type definitions
93
93
  'import/named': 'off',
94
94
  <% } else if (lintConfig === 'airbnb') { %>
95
+ 'no-plusplus': 'off',
95
96
  'no-param-reassign': 'off',
96
97
  'no-void': 'off',
97
98
  'no-nested-ternary': 'off',
@@ -54,7 +54,7 @@ export default configure((<% if (preset.i18n) { %>ctx<% } else { %>/* ctx */<% }
54
54
  // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
55
55
  build: {
56
56
  target: {
57
- browser: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
57
+ browser: [ 'es2022', 'firefox115', 'chrome115', 'safari14' ],
58
58
  node: 'node20'
59
59
  },
60
60
 
@@ -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',
@@ -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(__dirname, 'BASE'), scope)
66
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
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(__dirname, 'axios'), scope)
69
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
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(__dirname, 'lint'), scope)
70
+ utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
72
71
  if (scope.lintConfig === 'prettier') {
73
- utils.renderTemplate(utils.join(__dirname, 'prettier'), scope)
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(__dirname, 'pinia'), scope)
78
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
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
  }
@@ -92,6 +92,7 @@ module.exports = {
92
92
  // does not work with type definitions
93
93
  'import/named': 'off',
94
94
  <% } else if (lintConfig === 'airbnb') { %>
95
+ 'no-plusplus': 'off',
95
96
  'no-param-reassign': 'off',
96
97
  'no-void': 'off',
97
98
  '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',
@@ -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(__dirname, 'BASE'), scope)
66
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
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(__dirname, 'axios'), scope)
69
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
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(__dirname, 'lint'), scope)
70
+ utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
72
71
  if (scope.lintConfig === 'prettier') {
73
- utils.renderTemplate(utils.join(__dirname, 'prettier'), scope)
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(__dirname, 'pinia'), scope)
78
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
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
  }
@@ -93,6 +93,7 @@ module.exports = {
93
93
  // does not work with type definitions
94
94
  'import/named': 'off',
95
95
  <% } else if (lintConfig === 'airbnb') { %>
96
+ 'no-plusplus': 'off',
96
97
  'no-param-reassign': 'off',
97
98
  'no-void': 'off',
98
99
  'no-nested-ternary': 'off',
@@ -61,7 +61,7 @@
61
61
  "last 5 Opera versions"
62
62
  ],
63
63
  "engines": {
64
- "node": "^24 || ^22 || ^20 || ^18 || ^16",
64
+ "node": "^24 || ^22 || ^20 || ^18",
65
65
  "npm": ">= 6.13.4",
66
66
  "yarn": ">= 1.21.1"
67
67
  }
@@ -66,6 +66,11 @@ export default configure((/* ctx */) => {
66
66
  // Applies only if "webpackTranspile" is set to true.
67
67
  // webpackTranspileDependencies: [],
68
68
 
69
+ esbuildTarget: {
70
+ browser: [ 'es2022', 'firefox115', 'chrome115', 'safari14' ],
71
+ node: 'node20'
72
+ },
73
+
69
74
  // rtl: true, // https://quasar.dev/options/rtl-support
70
75
  // preloadChunks: true,
71
76
  // showProgress: false,
@@ -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',
@@ -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(__dirname, 'BASE'), scope)
66
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
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(__dirname, 'axios'), scope)
69
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
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(__dirname, 'lint'), scope)
70
+ utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
72
71
  if (scope.lintConfig === 'prettier') {
73
- utils.renderTemplate(utils.join(__dirname, 'prettier'), scope)
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(__dirname, 'pinia'), scope)
78
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
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
  }
@@ -93,6 +93,7 @@ module.exports = {
93
93
  // does not work with type definitions
94
94
  'import/named': 'off',
95
95
  <% } else if (lintConfig === 'airbnb') { %>
96
+ 'no-plusplus': 'off',
96
97
  'no-param-reassign': 'off',
97
98
  'no-void': 'off',
98
99
  '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: 'confirm',
@@ -8,11 +7,11 @@ module.exports = async function ({ scope, utils }) {
8
7
  message: 'Will you use an organization to publish it? Eg. "@my-org/..."'
9
8
  },
10
9
  {
11
- type: (_, { needOrgName } = {}) => needOrgName ? 'text' : null,
10
+ type: (_, { needOrgName } = {}) => (needOrgName ? 'text' : null),
12
11
  name: 'orgName',
13
12
  message: 'Organization name, eg. "my-org":',
14
13
  validate: val =>
15
- val && val.length > 0 || 'Please type the organization name'
14
+ (val && val.length > 0) || 'Please type the organization name'
16
15
  },
17
16
  {
18
17
  type: 'text',
@@ -85,11 +84,11 @@ module.exports = async function ({ scope, utils }) {
85
84
  ])
86
85
 
87
86
  utils.createTargetDir(scope)
88
- utils.renderTemplate(utils.join(__dirname, 'BASE'), scope)
87
+ utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
89
88
 
90
- if (scope.preset.prompts) utils.renderTemplate(utils.join(__dirname, 'prompts-script'), scope)
91
- if (scope.preset.install) utils.renderTemplate(utils.join(__dirname, 'install-script'), scope)
92
- if (scope.preset.uninstall) utils.renderTemplate(utils.join(__dirname, 'uninstall-script'), scope)
89
+ if (scope.preset.prompts) utils.renderTemplate(utils.join(import.meta.url, 'prompts-script'), scope)
90
+ if (scope.preset.install) utils.renderTemplate(utils.join(import.meta.url, 'install-script'), scope)
91
+ if (scope.preset.uninstall) utils.renderTemplate(utils.join(import.meta.url, 'uninstall-script'), scope)
93
92
 
94
93
  // nothing to install, so we'll skip it
95
94
  scope.skipDepsInstall = true
@@ -1,4 +1,4 @@
1
- module.exports = async function ({ scope, utils }) {
2
- const script = require('./ae-v1')
1
+ export async function script ({ scope, utils }) {
2
+ const { script } = await import('./ae-v1/index.js')
3
3
  await script({ scope, utils })
4
4
  }
@@ -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
  utils.commonPrompts.quasarVersion,
5
4
 
@@ -41,7 +40,7 @@ module.exports = async function ({ scope, utils }) {
41
40
  type: 'text',
42
41
  name: 'packageDescription',
43
42
  message: 'Package description',
44
- initial: 'My awesome component',
43
+ initial: 'My awesome component'
45
44
  },
46
45
 
47
46
  {
@@ -52,7 +51,7 @@ module.exports = async function ({ scope, utils }) {
52
51
  },
53
52
 
54
53
  {
55
- type: (_, { features }) => features.component ? 'text' : null,
54
+ type: (_, { features }) => (features.component ? 'text' : null),
56
55
  name: 'componentName',
57
56
  message: 'Component name (PascalCase)',
58
57
  initial: 'MyComponent',
@@ -60,7 +59,7 @@ module.exports = async function ({ scope, utils }) {
60
59
  },
61
60
 
62
61
  {
63
- type: (_, { features }) => features.directive ? 'text' : null,
62
+ type: (_, { features }) => (features.directive ? 'text' : null),
64
63
  name: 'directiveName',
65
64
  message: 'Directive name (kebab-case, without "v-" prefix)',
66
65
  initial: 'my-directive',
@@ -68,7 +67,7 @@ module.exports = async function ({ scope, utils }) {
68
67
  },
69
68
 
70
69
  {
71
- type: (_, { features }) => features.ae ? 'text' : null,
70
+ type: (_, { features }) => (features.ae ? 'text' : null),
72
71
  name: 'aeDescription',
73
72
  message: 'App Extension description',
74
73
  initial: 'A Quasar App Extension',
@@ -76,7 +75,7 @@ module.exports = async function ({ scope, utils }) {
76
75
  },
77
76
 
78
77
  {
79
- type: (_, { features }) => features.ae ? 'multiselect' : null,
78
+ type: (_, { features }) => (features.ae ? 'multiselect' : null),
80
79
  name: 'preset',
81
80
  message: 'Pick the needed App Extension scripts:',
82
81
  format: utils.convertArrayToObject,
@@ -97,7 +96,7 @@ module.exports = async function ({ scope, utils }) {
97
96
  },
98
97
 
99
98
  {
100
- type: (_, { quasarVersion, features }) => quasarVersion === 'v2' && features.ae ? 'select' : null,
99
+ type: (_, { quasarVersion, features }) => (quasarVersion === 'v2' && features.ae ? 'select' : null),
101
100
  name: 'aeCodeFormat',
102
101
  message: 'Pick the App Extension format:',
103
102
  initial: 0,
@@ -113,7 +112,7 @@ module.exports = async function ({ scope, utils }) {
113
112
  utils.commonPrompts.bugs
114
113
  ])
115
114
 
116
- const script = require(`./quasar-${scope.quasarVersion}`)
115
+ const { script } = await import(`./quasar-${ scope.quasarVersion }/index.js`)
117
116
  await script({ scope, utils })
118
117
 
119
118
  // we don't want to install
@@ -56,5 +56,5 @@ module.exports.syncAppExt = function (both = true) {
56
56
  return
57
57
  }
58
58
 
59
- console.error(` App Extension version and dependency NOT synced.\n`)
59
+ console.error(' App Extension version and dependency NOT synced.\n')
60
60
  }
@@ -3,4 +3,4 @@ var
3
3
  path = require('path')
4
4
 
5
5
  rimraf.sync(path.resolve(__dirname, '../dist/*'))
6
- console.log(` 💥 Cleaned build artifacts.\n`)
6
+ console.log(' 💥 Cleaned build artifacts.\n')
@@ -47,7 +47,7 @@ module.exports = function (ctx) {
47
47
 
48
48
  chainWebpack (chain) {
49
49
  chain.resolve.alias.merge({
50
- 'ui': path.resolve(__dirname, '../src/index.js')
50
+ ui: path.resolve(__dirname, '../src/index.js')
51
51
  })
52
52
  }
53
53
  },
@@ -1,19 +1,18 @@
1
-
2
- module.exports = async function ({ scope, utils }) {
1
+ export async function script ({ scope, utils }) {
3
2
  utils.createTargetDir(scope)
4
- utils.renderTemplate(utils.join(__dirname, 'BASE'), scope)
3
+ utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
5
4
 
6
5
  if (scope.features.ae) {
7
- utils.renderTemplate(utils.join(__dirname, 'ae'), scope)
8
- if (scope.preset.install) utils.renderTemplate(utils.join(__dirname, 'ae-install'), scope)
9
- if (scope.preset.prompts) utils.renderTemplate(utils.join(__dirname, 'ae-prompts'), scope)
10
- if (scope.preset.uninstall) utils.renderTemplate(utils.join(__dirname, 'ae-uninstall'), scope)
6
+ utils.renderTemplate(utils.join(import.meta.url, 'ae'), scope)
7
+ if (scope.preset.install) utils.renderTemplate(utils.join(import.meta.url, 'ae-install'), scope)
8
+ if (scope.preset.prompts) utils.renderTemplate(utils.join(import.meta.url, 'ae-prompts'), scope)
9
+ if (scope.preset.uninstall) utils.renderTemplate(utils.join(import.meta.url, 'ae-uninstall'), scope)
11
10
  }
12
11
 
13
- if (scope.features.component) utils.renderTemplate(utils.join(__dirname, 'ui-component'), scope)
14
- if (scope.features.directive) utils.renderTemplate(utils.join(__dirname, 'ui-directive'), scope)
12
+ if (scope.features.component) utils.renderTemplate(utils.join(import.meta.url, 'ui-component'), scope)
13
+ if (scope.features.directive) utils.renderTemplate(utils.join(import.meta.url, 'ui-directive'), scope)
15
14
 
16
15
  if (scope.features.ae && (scope.features.component || scope.features.directive)) {
17
- utils.renderTemplate(utils.join(__dirname, 'ui-ae'), scope)
16
+ utils.renderTemplate(utils.join(import.meta.url, 'ui-ae'), scope)
18
17
  }
19
18
  }
@@ -1,19 +1,18 @@
1
-
2
- module.exports = async function ({ scope, utils }) {
1
+ export async function script ({ scope, utils }) {
3
2
  utils.createTargetDir(scope)
4
- utils.renderTemplate(utils.join(__dirname, 'BASE'), scope)
3
+ utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
5
4
 
6
5
  if (scope.features.ae) {
7
- utils.renderTemplate(utils.join(__dirname, 'ae'), scope)
8
- if (scope.preset.install) utils.renderTemplate(utils.join(__dirname, 'ae-install'), scope)
9
- if (scope.preset.prompts) utils.renderTemplate(utils.join(__dirname, 'ae-prompts'), scope)
10
- if (scope.preset.uninstall) utils.renderTemplate(utils.join(__dirname, 'ae-uninstall'), scope)
6
+ utils.renderTemplate(utils.join(import.meta.url, 'ae'), scope)
7
+ if (scope.preset.install) utils.renderTemplate(utils.join(import.meta.url, 'ae-install'), scope)
8
+ if (scope.preset.prompts) utils.renderTemplate(utils.join(import.meta.url, 'ae-prompts'), scope)
9
+ if (scope.preset.uninstall) utils.renderTemplate(utils.join(import.meta.url, 'ae-uninstall'), scope)
11
10
  }
12
11
 
13
- if (scope.features.component) utils.renderTemplate(utils.join(__dirname, 'ui-component'), scope)
14
- if (scope.features.directive) utils.renderTemplate(utils.join(__dirname, 'ui-directive'), scope)
12
+ if (scope.features.component) utils.renderTemplate(utils.join(import.meta.url, 'ui-component'), scope)
13
+ if (scope.features.directive) utils.renderTemplate(utils.join(import.meta.url, 'ui-directive'), scope)
15
14
 
16
15
  if (scope.features.ae && (scope.features.component || scope.features.directive)) {
17
- utils.renderTemplate(utils.join(__dirname, 'ui-ae'), scope)
16
+ utils.renderTemplate(utils.join(import.meta.url, 'ui-ae'), scope)
18
17
  }
19
18
  }