create-quasar 1.4.0 → 1.4.2

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 (36) hide show
  1. package/package.json +4 -4
  2. package/templates/app/quasar-v2/js-vite/BASE/quasar.config.js +7 -7
  3. package/templates/app/quasar-v2/js-vite-beta/BASE/_package.json +3 -3
  4. package/templates/app/quasar-v2/js-vite-beta/BASE/quasar.config.js +7 -7
  5. package/templates/app/quasar-v2/js-webpack-beta/BASE/_package.json +3 -3
  6. package/templates/app/quasar-v2/ts-vite-beta/BASE/_package.json +7 -7
  7. package/templates/app/quasar-v2/ts-webpack-beta/BASE/_package.json +9 -7
  8. package/templates/app/quasar-v2/ts-webpack-beta/BASE/quasar.config.ts +1 -11
  9. package/templates/app-extension/{ae-v1-commonjs → ae-v1}/.eslintrc.js +3 -1
  10. package/templates/app-extension/{ae-v1-esm → ae-v1}/BASE/_package.json +1 -2
  11. package/templates/app-extension/{ae-v1-esm → ae-v1}/BASE/src/index.js +1 -1
  12. package/templates/app-extension/{ae-v1-commonjs → ae-v1}/index.js +11 -0
  13. package/templates/app-extension/{ae-v1-esm/install-script → ae-v1/install-script/src}/install.js +1 -1
  14. package/templates/app-extension/{ae-v1-esm/prompts-script → ae-v1/prompts-script/src}/prompts.js +1 -1
  15. package/templates/app-extension/{ae-v1-esm/uninstall-script → ae-v1/uninstall-script/src}/uninstall.js +1 -1
  16. package/templates/app-extension/index.js +1 -14
  17. package/templates/ui-kit/.eslintrc.js +1 -0
  18. package/templates/ui-kit/index.js +11 -0
  19. package/templates/ui-kit/quasar-v2/ae/app-extension/_package.json +1 -1
  20. package/templates/ui-kit/quasar-v2/ae/app-extension/src/index.js +12 -6
  21. package/templates/ui-kit/quasar-v2/ae-install/app-extension/src/install.js +12 -2
  22. package/templates/ui-kit/quasar-v2/ae-prompts/app-extension/src/prompts.js +1 -1
  23. package/templates/ui-kit/quasar-v2/ae-uninstall/app-extension/src/uninstall.js +1 -1
  24. package/templates/app-extension/ae-v1-commonjs/BASE/_package.json +0 -23
  25. package/templates/app-extension/ae-v1-commonjs/BASE/src/index.js +0 -11
  26. package/templates/app-extension/ae-v1-commonjs/install-script/install.js +0 -10
  27. package/templates/app-extension/ae-v1-commonjs/prompts-script/prompts.js +0 -44
  28. package/templates/app-extension/ae-v1-commonjs/uninstall-script/uninstall.js +0 -10
  29. package/templates/app-extension/ae-v1-esm/.eslintrc.js +0 -35
  30. package/templates/app-extension/ae-v1-esm/BASE/README.md +0 -36
  31. package/templates/app-extension/ae-v1-esm/BASE/_.gitignore +0 -14
  32. package/templates/app-extension/ae-v1-esm/BASE/src/templates/_.gitkeep +0 -0
  33. package/templates/app-extension/ae-v1-esm/index.js +0 -85
  34. /package/templates/app-extension/{ae-v1-commonjs → ae-v1}/BASE/README.md +0 -0
  35. /package/templates/app-extension/{ae-v1-commonjs → ae-v1}/BASE/_.gitignore +0 -0
  36. /package/templates/app-extension/{ae-v1-commonjs → ae-v1}/BASE/src/templates/_.gitkeep +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-quasar",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Scaffolds Quasar Apps, AppExtensions or UI kits",
5
5
  "author": {
6
6
  "name": "Razvan Stoenescu",
@@ -37,10 +37,10 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/lodash": "^4.6.7",
40
- "@typescript-eslint/eslint-plugin": "^5.16.0",
41
- "@typescript-eslint/parser": "^5.16.0",
40
+ "@typescript-eslint/eslint-plugin": "^6.6.0",
41
+ "@typescript-eslint/parser": "^6.6.0",
42
42
  "eslint": "^8.11.0",
43
43
  "eslint-plugin-lodash-template": "^0.21.0",
44
- "typescript": "^4.6.2"
44
+ "typescript": "^5.2.2"
45
45
  }
46
46
  }
@@ -24,12 +24,12 @@ module.exports = configure(function (/* ctx */) {
24
24
  errors: true
25
25
  },<% } %>
26
26
 
27
- // https://v2.quasar.dev/quasar-cli/prefetch-feature
27
+ // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
28
28
  // preFetch: true,
29
29
 
30
30
  // app boot file (/src/boot)
31
31
  // --> boot files are part of "main.js"
32
- // https://v2.quasar.dev/quasar-cli/boot-files
32
+ // https://v2.quasar.dev/quasar-cli-vite/boot-files
33
33
  boot: [
34
34
  <% if (preset.i18n) { %>'i18n',<% } %>
35
35
  <% if (preset.axios) { %>'axios',<% } %>
@@ -138,7 +138,7 @@ module.exports = configure(function (/* ctx */) {
138
138
  // electronPreload: 'src-electron/electron-preload'
139
139
  // },
140
140
 
141
- // https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
141
+ // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
142
142
  ssr: {
143
143
  // ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
144
144
  // will mess up SSR
@@ -159,7 +159,7 @@ module.exports = configure(function (/* ctx */) {
159
159
  ]
160
160
  },
161
161
 
162
- // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
162
+ // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
163
163
  pwa: {
164
164
  workboxMode: 'generateSW', // or 'injectManifest'
165
165
  injectPwaMetaTags: true,
@@ -173,17 +173,17 @@ module.exports = configure(function (/* ctx */) {
173
173
  // extendPWACustomSWConf (esbuildConf) {}
174
174
  },
175
175
 
176
- // Full list of options: https://v2.quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
176
+ // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
177
177
  cordova: {
178
178
  // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
179
179
  },
180
180
 
181
- // Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
181
+ // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
182
182
  capacitor: {
183
183
  hideSplashscreen: true
184
184
  },
185
185
 
186
- // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
186
+ // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
187
187
  electron: {
188
188
  // extendElectronMainConf (esbuildConf)
189
189
  // extendElectronPreloadConf (esbuildConf)
@@ -36,8 +36,8 @@
36
36
  "eslint-config-airbnb-base": "^15.0.0",
37
37
  "eslint-plugin-import": "^2.20.1",
38
38
  <% } else if (lintConfig === 'prettier') { %>
39
- "eslint-config-prettier": "^8.1.0",
40
- "prettier": "^2.5.1",
39
+ "eslint-config-prettier": "^9.0.0",
40
+ "prettier": "^3.0.3",
41
41
  <% } } %>
42
42
  <% if (preset.i18n) { %>"@intlify/vite-plugin-vue-i18n": "^3.3.1",<% } %>
43
43
  "@quasar/app-vite": "^2.0.0-alpha.0",
@@ -45,7 +45,7 @@
45
45
  "postcss": "^8.4.14"
46
46
  },
47
47
  "engines": {
48
- "node": "^18 || ^16 || ^14.19",
48
+ "node": "^24 || ^22 || ^20 || ^18",
49
49
  "npm": ">= 6.13.4",
50
50
  "yarn": ">= 1.21.1"
51
51
  }
@@ -20,12 +20,12 @@ export default configure((/* ctx */) => {
20
20
  errors: true
21
21
  },<% } %>
22
22
 
23
- // https://v2.quasar.dev/quasar-cli/prefetch-feature
23
+ // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
24
24
  // preFetch: true,
25
25
 
26
26
  // app boot file (/src/boot)
27
27
  // --> boot files are part of "main.js"
28
- // https://v2.quasar.dev/quasar-cli/boot-files
28
+ // https://v2.quasar.dev/quasar-cli-vite/boot-files
29
29
  boot: [
30
30
  <% if (preset.i18n) { %>'i18n',<% } %>
31
31
  <% if (preset.axios) { %>'axios',<% } %>
@@ -135,7 +135,7 @@ export default configure((/* ctx */) => {
135
135
  // bexManifestFile: 'src-bex/manifest.json
136
136
  // },
137
137
 
138
- // https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
138
+ // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
139
139
  ssr: {
140
140
  prodPort: 3000, // The default port that the production server should use
141
141
  // (gets superseded if process.env.PORT is specified at runtime)
@@ -161,7 +161,7 @@ export default configure((/* ctx */) => {
161
161
  // pwaExtendInjectManifestOptions (cfg) {}
162
162
  },
163
163
 
164
- // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
164
+ // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
165
165
  pwa: {
166
166
  workboxMode: 'GenerateSW' // 'GenerateSW' or 'InjectManifest'
167
167
  // swFilename: 'sw.js',
@@ -174,17 +174,17 @@ export default configure((/* ctx */) => {
174
174
  // extendInjectManifestOptions (cfg) {}
175
175
  },
176
176
 
177
- // Full list of options: https://v2.quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
177
+ // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
178
178
  cordova: {
179
179
  // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
180
180
  },
181
181
 
182
- // Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
182
+ // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
183
183
  capacitor: {
184
184
  hideSplashscreen: true
185
185
  },
186
186
 
187
- // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
187
+ // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
188
188
  electron: {
189
189
  // extendElectronMainConf (esbuildConf) {},
190
190
  // extendElectronPreloadConf (esbuildConf) {},
@@ -39,8 +39,8 @@
39
39
  "eslint-config-airbnb-base": "^15.0.0",
40
40
  "eslint-plugin-import": "^2.20.1",
41
41
  <% } else if (lintConfig === 'prettier') { %>
42
- "eslint-config-prettier": "^8.1.0",
43
- "prettier": "^2.5.1",
42
+ "eslint-config-prettier": "^9.0.0",
43
+ "prettier": "^3.0.3",
44
44
  <% } } %>
45
45
  "@quasar/app-webpack": "^4.0.0-alpha.0"
46
46
  },
@@ -56,7 +56,7 @@
56
56
  "last 5 Opera versions"
57
57
  ],
58
58
  "engines": {
59
- "node": ">= 12.22.1",
59
+ "node": "^24 || ^22 || ^20 || ^18 || ^16",
60
60
  "npm": ">= 6.13.4",
61
61
  "yarn": ">= 1.21.1"
62
62
  }
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  <% if (preset.lint) { %>
29
- "@typescript-eslint/eslint-plugin": "^5.10.0",
30
- "@typescript-eslint/parser": "^5.10.0",
29
+ "@typescript-eslint/eslint-plugin": "^6.6.0",
30
+ "@typescript-eslint/parser": "^6.6.0",
31
31
  "eslint": "^8.10.0",
32
32
  "eslint-plugin-vue": "^9.0.0",
33
33
  <% if (lintConfig === 'standard') { %>
@@ -39,17 +39,17 @@
39
39
  "eslint-config-airbnb-base": "^15.0.0",
40
40
  "eslint-plugin-import": "^2.20.1",
41
41
  <% } else if (lintConfig === 'prettier') { %>
42
- "eslint-config-prettier": "^8.1.0",
43
- "prettier": "^2.5.1",
42
+ "eslint-config-prettier": "^9.0.0",
43
+ "prettier": "^3.0.3",
44
44
  <% } } %>
45
- "@types/node": "^12.20.21",
45
+ "@types/node": "^20.5.9",
46
46
  <% if (preset.i18n) { %>"@intlify/vite-plugin-vue-i18n": "^3.3.1",<% } %>
47
47
  "@quasar/app-vite": "^2.0.0-alpha.0",
48
48
  "autoprefixer": "^10.4.2",
49
- "typescript": "^4.5.4"
49
+ "typescript": "^5.2.2"
50
50
  },
51
51
  "engines": {
52
- "node": "^18 || ^16 || ^14.19",
52
+ "node": "^24 || ^22 || ^20 || ^18",
53
53
  "npm": ">= 6.13.4",
54
54
  "yarn": ">= 1.21.1"
55
55
  }
@@ -27,10 +27,11 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  <% if (preset.lint) { %>
30
- "@typescript-eslint/eslint-plugin": "^5.10.0",
31
- "@typescript-eslint/parser": "^5.10.0",
30
+ "@typescript-eslint/eslint-plugin": "^6.6.0",
31
+ "@typescript-eslint/parser": "^6.6.0",
32
32
  "eslint": "^8.10.0",
33
33
  "eslint-plugin-vue": "^9.0.0",
34
+ "eslint-webpack-plugin": "^4.0.1",
34
35
  <% if (lintConfig === 'standard') { %>
35
36
  "eslint-config-standard": "^17.0.0",
36
37
  "eslint-plugin-import": "^2.19.1",
@@ -40,11 +41,12 @@
40
41
  "eslint-config-airbnb-base": "^15.0.0",
41
42
  "eslint-plugin-import": "^2.20.1",
42
43
  <% } else if (lintConfig === 'prettier') { %>
43
- "eslint-config-prettier": "^8.1.0",
44
- "prettier": "^2.5.1",
44
+ "eslint-config-prettier": "^9.0.0",
45
+ "prettier": "^3.0.3",
45
46
  <% } } %>
46
- "@types/node": "^12.20.21",
47
- "@quasar/app-webpack": "^4.0.0-alpha.0"
47
+ "@quasar/app-webpack": "^4.0.0-alpha.0",
48
+ "ts-loader": "^9.4.2",
49
+ "typescript": "^5.2.2"
48
50
  },
49
51
  "browserslist": [
50
52
  "last 10 Chrome versions",
@@ -58,7 +60,7 @@
58
60
  "last 5 Opera versions"
59
61
  ],
60
62
  "engines": {
61
- "node": ">= 12.22.1",
63
+ "node": "^24 || ^22 || ^20 || ^18 || ^16",
62
64
  "npm": ">= 6.13.4",
63
65
  "yarn": ">= 1.21.1"
64
66
  }
@@ -12,7 +12,7 @@
12
12
  <% } %>
13
13
  import { configure } from 'quasar/wrappers';
14
14
 
15
- export default configure((ctx) => {
15
+ export default configure((/* ctx */) => {
16
16
  return {
17
17
  <% if (preset.lint) { %>eslint: {
18
18
  // fix: true,
@@ -56,16 +56,6 @@ export default configure((ctx) => {
56
56
 
57
57
  // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-build
58
58
  build: {
59
- <% if (preset.lint) { %>
60
- tsCheckerOptions: {
61
- eslint: {
62
- enabled: true,
63
- files: './src/**/*.{ts,tsx,js,jsx,vue}',
64
- },
65
- },
66
-
67
- <% } %>
68
-
69
59
  // publicPath: '/',
70
60
  vueRouterMode: 'hash', // available values: 'hash', 'history'
71
61
 
@@ -12,7 +12,9 @@ module.exports = {
12
12
  'repositoryType',
13
13
  'repositoryURL',
14
14
  'homepage',
15
- 'bugs'
15
+ 'bugs',
16
+
17
+ 'codeFormat'
16
18
  ]
17
19
  },
18
20
 
@@ -5,8 +5,7 @@
5
5
  "description": "<%= description %>",
6
6
  "author": "<%= author %>",
7
7
  "license": "<%= license %>",
8
- "type": "module",
9
- "module": "src/index.js",
8
+ "type": "<%= codeFormat === 'esm' ? 'module' : 'commonjs' %>",
10
9
  "scripts": {
11
10
  "test": "echo \"No test specified\" && exit 0"
12
11
  },
@@ -6,6 +6,6 @@
6
6
  * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/IndexAPI.js
7
7
  */
8
8
 
9
- module.exports = function (api) {
9
+ <%= codeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
10
10
  //
11
11
  }
@@ -22,6 +22,17 @@ module.exports = async function ({ scope, utils }) {
22
22
  utils.isValidPackageName(val) || 'Invalid App Extension name'
23
23
  },
24
24
 
25
+ {
26
+ type: 'select',
27
+ name: 'codeFormat',
28
+ message: 'Pick AE code format:',
29
+ initial: 0,
30
+ choices: [
31
+ { title: 'ESM (q/app-vite >= 1.5, q/app-webpack >= 3.10)', value: 'esm', description: 'recommended' },
32
+ { title: 'CommonJS', value: 'commonjs' }
33
+ ]
34
+ },
35
+
25
36
  utils.commonPrompts.description,
26
37
  utils.commonPrompts.author,
27
38
  {
@@ -5,6 +5,6 @@
5
5
  * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/InstallAPI.js
6
6
  */
7
7
 
8
- export default function (api) {
8
+ <%= codeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
9
9
  //
10
10
  }
@@ -39,6 +39,6 @@
39
39
 
40
40
  */
41
41
 
42
- export default function () {
42
+ <%= codeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
43
43
  return []
44
44
  }
@@ -5,6 +5,6 @@
5
5
  * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/UninstallAPI.js
6
6
  */
7
7
 
8
- export default function (api) {
8
+ <%= codeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
9
9
  //
10
10
  }
@@ -1,17 +1,4 @@
1
1
  module.exports = async function ({ scope, utils }) {
2
- await utils.prompts(scope, [
3
- {
4
- type: 'select',
5
- name: 'extFormat',
6
- message: 'Pick AE format:',
7
- initial: 0,
8
- choices: [
9
- { title: 'ESM (q/app-vite >= 1.5, q/app-webpack >= 3.10)', value: 'esm', description: 'recommended' },
10
- { title: 'CommonJS', value: 'commonjs' }
11
- ]
12
- }
13
- ])
14
-
15
- const script = require(`./ae-v1-${ scope.extFormat }`)
2
+ const script = require('./ae-v1')
16
3
  await script({ scope, utils })
17
4
  }
@@ -11,6 +11,7 @@ module.exports = {
11
11
 
12
12
  'packageDescription',
13
13
  'aeDescription',
14
+ 'aeCodeFormat',
14
15
 
15
16
  'umdExportName',
16
17
  'componentName',
@@ -96,6 +96,17 @@ module.exports = async function ({ scope, utils }) {
96
96
  ]
97
97
  },
98
98
 
99
+ {
100
+ type: (_, { quasarVersion, features }) => quasarVersion === 'v2' && features.ae ? 'select' : null,
101
+ name: 'aeCodeFormat',
102
+ message: 'Pick the App Extension format:',
103
+ initial: 0,
104
+ choices: [
105
+ { title: 'ESM (q/app-vite >= 1.5, q/app-webpack >= 3.10)', value: 'esm', description: 'recommended' },
106
+ { title: 'CommonJS', value: 'commonjs' }
107
+ ]
108
+ },
109
+
99
110
  utils.commonPrompts.repositoryType,
100
111
  utils.commonPrompts.repositoryURL,
101
112
  utils.commonPrompts.homepage,
@@ -4,7 +4,7 @@
4
4
  "description": "<%= aeDescription %>",
5
5
  "author": "<%= author %>",
6
6
  "license": "<%= license %>",
7
- "main": "src/index.js",
7
+ "type": "<%= aeCodeFormat === 'esm' ? 'module' : 'commonjs' %>",
8
8
  "repository": {
9
9
  "type": "<%= repositoryType %>",
10
10
  "url": "<%= repositoryURL %>"
@@ -6,28 +6,34 @@
6
6
  * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/IndexAPI.js
7
7
  */
8
8
 
9
- function extendConf (conf) {
9
+ function extendConf (conf, api) {
10
10
  // register our boot file
11
11
  conf.boot.push('~quasar-app-extension-<%= name %>/src/boot/register.js')
12
12
 
13
- // make sure app extension files & ui package gets transpiled
14
- conf.build.transpileDependencies.push(/quasar-app-extension-<%= name %>[\\/]src/)
13
+ if (api.hasWebpack) {
14
+ // make sure app extension files & ui package gets transpiled
15
+ const transpileTarget = (
16
+ conf.build.webpackTranspileDependencies // q/app-webpack >= v4
17
+ || conf.build.transpileDependencies // q/app-webpack v3
18
+ )
19
+ transpileTarget.push(/quasar-app-extension-<%= name %>[\\/]src/)
20
+ }
15
21
 
16
22
  // make sure the stylesheet goes through webpack to avoid SSR issues
17
23
  conf.css.push('~quasar-ui-<%= name %>/src/index.sass')
18
24
  }
19
25
 
20
- module.exports = function (api) {
26
+ <%= aeCodeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
21
27
  // Quasar compatibility check; you may need
22
28
  // hard dependencies, as in a minimum version of the "quasar"
23
29
  // package or a minimum version of "@quasar/app-*" CLI
24
30
  api.compatibleWith('quasar', '^2.0.0')
25
31
 
26
32
  if (api.hasVite) {
27
- api.compatibleWith('@quasar/app-vite', '^1.0.0')
33
+ api.compatibleWith('@quasar/app-vite', '^1.5.0 || ^2.0.0')
28
34
  }
29
35
  else if (api.hasWebpack) {
30
- api.compatibleWith('@quasar/app-webpack', '^3.4.0')
36
+ api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0')
31
37
  }
32
38
 
33
39
  <% if (features.component) { %>
@@ -5,6 +5,16 @@
5
5
  * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/InstallAPI.js
6
6
  */
7
7
 
8
- module.exports = function (api) {
9
- //
8
+ <%= aeCodeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
9
+ // Quasar compatibility check; you may need
10
+ // hard dependencies, as in a minimum version of the "quasar"
11
+ // package or a minimum version of "@quasar/app-*" CLI
12
+ api.compatibleWith('quasar', '^2.0.0')
13
+
14
+ if (api.hasVite) {
15
+ api.compatibleWith('@quasar/app-vite', '^1.0.0 || ^2.0.0')
16
+ }
17
+ else if (api.hasWebpack) {
18
+ api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0')
19
+ }
10
20
  }
@@ -39,6 +39,6 @@
39
39
 
40
40
  */
41
41
 
42
- module.exports = function () {
42
+ <%= aeCodeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
43
43
  return []
44
44
  }
@@ -5,6 +5,6 @@
5
5
  * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/UninstallAPI.js
6
6
  */
7
7
 
8
- module.exports = function (api) {
8
+ <%= aeCodeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
9
9
  //
10
10
  }
@@ -1,23 +0,0 @@
1
- {
2
- <% if (needOrgName) { %>"name": "@<%= orgName %>/quasar-app-extension-<%= name %>",
3
- <% } else { %>"name": "quasar-app-extension-<%= name %>",<% } %>
4
- "version": "0.0.1",
5
- "description": "<%= description %>",
6
- "author": "<%= author %>",
7
- "license": "<%= license %>",
8
- "main": "src/index.js",
9
- "scripts": {
10
- "test": "echo \"No test specified\" && exit 0"
11
- },
12
- "repository": {
13
- "type": "<%= repositoryType %>",
14
- "url": "<%= repositoryURL %>"
15
- },
16
- "bugs": "<%= bugs %>",
17
- "homepage": "<%= homepage %>",
18
- "engines": {
19
- "node": ">= 12.2.0",
20
- "npm": ">= 5.6.0",
21
- "yarn": ">= 1.6.0"
22
- }
23
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Quasar App Extension index/runner script
3
- * (runs on each dev/build)
4
- *
5
- * Docs: https://quasar.dev/app-extensions/development-guide/index-api
6
- * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/IndexAPI.js
7
- */
8
-
9
- module.exports = function (api) {
10
- //
11
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * Quasar App Extension install script
3
- *
4
- * Docs: https://quasar.dev/app-extensions/development-guide/install-api
5
- * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/InstallAPI.js
6
- */
7
-
8
- module.exports = function (api) {
9
- //
10
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * Quasar App Extension prompts script
3
- *
4
- * Docs: https://quasar.dev/app-extensions/development-guide/prompts-api
5
- *
6
- * Inquirer prompts
7
- * (answers are available as "api.prompts" in the other scripts)
8
- * https://www.npmjs.com/package/inquirer#question
9
- *
10
- * Example:
11
-
12
- return [
13
- {
14
- name: 'name',
15
- type: 'input',
16
- required: true,
17
- message: 'Quasar CLI Extension name (without prefix)',
18
- },
19
- {
20
- name: 'preset',
21
- type: 'checkbox',
22
- message: 'Check the features needed for your project:',
23
- choices: [
24
- {
25
- name: 'Install script',
26
- value: 'install'
27
- },
28
- {
29
- name: 'Prompts script',
30
- value: 'prompts'
31
- },
32
- {
33
- name: 'Uninstall script',
34
- value: 'uninstall'
35
- }
36
- ]
37
- }
38
- ]
39
-
40
- */
41
-
42
- module.exports = function () {
43
- return []
44
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * Quasar App Extension uninstall script
3
- *
4
- * Docs: https://quasar.dev/app-extensions/development-guide/uninstall-api
5
- * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/UninstallAPI.js
6
- */
7
-
8
- module.exports = function (api) {
9
- //
10
- }
@@ -1,35 +0,0 @@
1
- module.exports = {
2
- settings: {
3
- 'lodash-template/globals': [
4
- // Base
5
- 'name',
6
- 'description',
7
- 'author',
8
-
9
- 'preset',
10
- 'orgName',
11
- 'license',
12
- 'repositoryType',
13
- 'repositoryURL',
14
- 'homepage',
15
- 'bugs'
16
- ]
17
- },
18
-
19
- overrides: [
20
- {
21
- files: [
22
- './*/**/*.js',
23
- ],
24
-
25
- parserOptions: {
26
- sourceType: 'script'
27
- },
28
-
29
- env: {
30
- browser: false,
31
- node: true,
32
- },
33
- },
34
- ]
35
- }
@@ -1,36 +0,0 @@
1
- Quasar App Extension <%= name %>
2
- ===
3
-
4
- _Be sure to change this readme as appropriate for your app extension._
5
-
6
- _Think about the organization of this file and how the information will be beneficial to the user._
7
-
8
- > Add a short description of your App Extension. What does it do? How is it beneficial? Why would someone want to use it?
9
-
10
- <%= description %>
11
-
12
- # Install
13
- ```bash
14
- quasar ext add <%= name %>
15
- ```
16
- Quasar CLI will retrieve it from the NPM registry and install the extension to your project.
17
-
18
- <% if (preset.prompts) { %>
19
- ## Prompts
20
-
21
- > Explain the prompts here
22
-
23
- <% } %>
24
- # Uninstall
25
- ```bash
26
- quasar ext remove <%= name %>
27
- ```
28
-
29
- # Info
30
- > Add longer information here that will help the user of your app extension.
31
-
32
- # Other Info
33
- > Add other information that's not as important to know
34
-
35
- # Donate
36
- If you appreciate the work that went into this App Extension, please consider [donating to Quasar](https://donate.quasar.dev).
@@ -1,14 +0,0 @@
1
- .DS_Store
2
- .thumbs.db
3
- node_modules
4
- npm-debug.log*
5
- yarn-debug.log*
6
- yarn-error.log*
7
-
8
- # Editor directories and files
9
- .idea
10
- .vscode
11
- *.suo
12
- *.ntvs*
13
- *.njsproj
14
- *.sln
@@ -1,85 +0,0 @@
1
-
2
- module.exports = async function ({ scope, utils }) {
3
- await utils.prompts(scope, [
4
- {
5
- type: 'confirm',
6
- name: 'needOrgName',
7
- initial: false,
8
- message: 'Will you use an organization to publish it? Eg. "@my-org/..."'
9
- },
10
- {
11
- type: (_, { needOrgName } = {}) => needOrgName ? 'text' : null,
12
- name: 'orgName',
13
- message: 'Organization name, eg. "my-org":',
14
- validate: val =>
15
- val && val.length > 0 || 'Please type the organization name'
16
- },
17
- {
18
- type: 'text',
19
- name: 'name',
20
- message: 'Quasar App Extension ext-id (without "quasar-app-extension" prefix), eg. "my-ext"',
21
- validate: (val) =>
22
- utils.isValidPackageName(val) || 'Invalid App Extension name'
23
- },
24
-
25
- utils.commonPrompts.description,
26
- utils.commonPrompts.author,
27
- {
28
- type: 'text',
29
- name: 'license',
30
- initial: 'MIT',
31
- message: 'License type:'
32
- },
33
- {
34
- type: 'multiselect',
35
- name: 'preset',
36
- message: 'Pick the needed scripts:',
37
- choices: [
38
- {
39
- title: 'Prompts script',
40
- value: 'prompts'
41
- },
42
- {
43
- title: 'Install script',
44
- value: 'install'
45
- },
46
- {
47
- title: 'Uninstall script',
48
- value: 'uninstall'
49
- }
50
- ],
51
- format: utils.convertArrayToObject
52
- },
53
- {
54
- type: 'text',
55
- name: 'repositoryType',
56
- initial: 'git',
57
- message: 'Repository type:'
58
- },
59
- {
60
- type: 'text',
61
- name: 'repositoryURL',
62
- message: 'Repository URL (eg https://github.com/quasarframework/quasar):'
63
- },
64
- {
65
- type: 'text',
66
- name: 'homepage',
67
- message: 'Homepage URL:'
68
- },
69
- {
70
- type: 'text',
71
- name: 'bugs',
72
- message: 'Issue reporting URL (eg https://github.com/quasarframework/quasar/issues):'
73
- }
74
- ])
75
-
76
- utils.createTargetDir(scope)
77
- utils.renderTemplate(utils.join(__dirname, 'BASE'), scope)
78
-
79
- if (scope.preset.prompts) utils.renderTemplate(utils.join(__dirname, 'prompts-script'), scope)
80
- if (scope.preset.install) utils.renderTemplate(utils.join(__dirname, 'install-script'), scope)
81
- if (scope.preset.uninstall) utils.renderTemplate(utils.join(__dirname, 'uninstall-script'), scope)
82
-
83
- // nothing to install, so we'll skip it
84
- scope.skipDepsInstall = true
85
- }