create-quasar 1.10.1 → 1.11.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 (78) hide show
  1. package/package.json +3 -3
  2. package/templates/app/quasar-v2/index.js +4 -4
  3. package/templates/app/quasar-v2/js-vite-1/BASE/quasar.config.js +0 -1
  4. package/templates/app/quasar-v2/js-vite-2/.eslintrc.cjs +1 -1
  5. package/templates/app/quasar-v2/js-vite-2/BASE/README.md +3 -4
  6. package/templates/app/quasar-v2/js-vite-2/BASE/_.editorconfig +2 -4
  7. package/templates/app/quasar-v2/js-vite-2/BASE/_.vscode/extensions.json +2 -2
  8. package/templates/app/quasar-v2/js-vite-2/BASE/_.vscode/settings.json +2 -2
  9. package/templates/app/quasar-v2/js-vite-2/BASE/_package.json +15 -21
  10. package/templates/app/quasar-v2/js-vite-2/BASE/postcss.config.js +0 -1
  11. package/templates/app/quasar-v2/js-vite-2/BASE/quasar.config.js +22 -17
  12. package/templates/app/quasar-v2/js-vite-2/eslint/_eslint.config.js +73 -0
  13. package/templates/app/quasar-v2/js-vite-2/index.js +11 -10
  14. package/templates/app/quasar-v2/js-vite-2/pinia/src/stores/example-store.js +13 -7
  15. package/templates/app/quasar-v2/js-vite-2/prettier/_.prettierrc.json +6 -0
  16. package/templates/app/quasar-v2/js-webpack-4/.eslintrc.cjs +1 -1
  17. package/templates/app/quasar-v2/js-webpack-4/BASE/README.md +3 -4
  18. package/templates/app/quasar-v2/js-webpack-4/BASE/_.editorconfig +2 -4
  19. package/templates/app/quasar-v2/js-webpack-4/BASE/_.vscode/extensions.json +2 -2
  20. package/templates/app/quasar-v2/js-webpack-4/BASE/_.vscode/settings.json +2 -2
  21. package/templates/app/quasar-v2/js-webpack-4/BASE/_package.json +17 -22
  22. package/templates/app/quasar-v2/js-webpack-4/BASE/{babel.config.cjs → babel.config.js} +1 -3
  23. package/templates/app/quasar-v2/js-webpack-4/BASE/{postcss.config.cjs → postcss.config.js} +3 -3
  24. package/templates/app/quasar-v2/js-webpack-4/BASE/quasar.config.js +18 -21
  25. package/templates/app/quasar-v2/js-webpack-4/BASE/src/router/index.js +1 -1
  26. package/templates/app/quasar-v2/js-webpack-4/eslint/_eslint.config.js +73 -0
  27. package/templates/app/quasar-v2/js-webpack-4/i18n/src/i18n/index.js +1 -1
  28. package/templates/app/quasar-v2/js-webpack-4/index.js +11 -10
  29. package/templates/app/quasar-v2/js-webpack-4/prettier/_.prettierrc.json +6 -0
  30. package/templates/app/quasar-v2/ts-vite-1/BASE/quasar.config.js +0 -1
  31. package/templates/app/quasar-v2/ts-vite-2/.eslintrc.cjs +1 -1
  32. package/templates/app/quasar-v2/ts-vite-2/BASE/README.md +3 -4
  33. package/templates/app/quasar-v2/ts-vite-2/BASE/_.editorconfig +2 -4
  34. package/templates/app/quasar-v2/ts-vite-2/BASE/_.vscode/extensions.json +2 -2
  35. package/templates/app/quasar-v2/ts-vite-2/BASE/_.vscode/settings.json +2 -2
  36. package/templates/app/quasar-v2/ts-vite-2/BASE/_package.json +16 -23
  37. package/templates/app/quasar-v2/ts-vite-2/BASE/postcss.config.js +0 -1
  38. package/templates/app/quasar-v2/ts-vite-2/BASE/quasar.config.ts +21 -17
  39. package/templates/app/quasar-v2/ts-vite-2/BASE/src/env.d.ts +0 -2
  40. package/templates/app/quasar-v2/ts-vite-2/eslint/_eslint.config.js +94 -0
  41. package/templates/app/quasar-v2/ts-vite-2/i18n/src/boot/i18n.ts +3 -3
  42. package/templates/app/quasar-v2/ts-vite-2/index.js +11 -16
  43. package/templates/app/quasar-v2/ts-vite-2/pinia/src/stores/example-store.ts +7 -1
  44. package/templates/app/quasar-v2/ts-vite-2/prettier/_.prettierrc.json +6 -0
  45. package/templates/app/quasar-v2/ts-webpack-4/.eslintrc.cjs +1 -1
  46. package/templates/app/quasar-v2/ts-webpack-4/BASE/README.md +3 -4
  47. package/templates/app/quasar-v2/ts-webpack-4/BASE/_.editorconfig +2 -4
  48. package/templates/app/quasar-v2/ts-webpack-4/BASE/_.vscode/extensions.json +2 -2
  49. package/templates/app/quasar-v2/ts-webpack-4/BASE/_.vscode/settings.json +2 -2
  50. package/templates/app/quasar-v2/ts-webpack-4/BASE/_package.json +19 -24
  51. package/templates/app/quasar-v2/ts-webpack-4/BASE/babel.config.cjs +0 -2
  52. package/templates/app/quasar-v2/ts-webpack-4/BASE/postcss.config.cjs +0 -1
  53. package/templates/app/quasar-v2/ts-webpack-4/BASE/quasar.config.ts +11 -13
  54. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/env.d.ts +0 -2
  55. package/templates/app/quasar-v2/ts-webpack-4/eslint/_eslint.config.js +94 -0
  56. package/templates/app/quasar-v2/ts-webpack-4/i18n/src/boot/i18n.ts +3 -3
  57. package/templates/app/quasar-v2/ts-webpack-4/index.js +11 -16
  58. package/templates/app/quasar-v2/ts-webpack-4/prettier/_.prettierrc.json +6 -0
  59. package/templates/app-extension/ae-ts/BASE/app-extension/_package.json +4 -4
  60. package/templates/app-extension/ae-ts/BASE/app-extension/src/index.ts +2 -2
  61. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/_package.json +1 -1
  62. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/quasar.config.ts +8 -0
  63. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/_package.json +1 -1
  64. package/templates/app-extension/ae-ts/install-script/app-extension/src/install.ts +2 -2
  65. package/templates/ui-kit/quasar-v2/ae/app-extension/src/index.js +2 -2
  66. package/templates/ui-kit/quasar-v2/ae-install/app-extension/src/install.js +2 -2
  67. package/utils/index.js +2 -2
  68. package/templates/app/quasar-v2/js-vite-2/lint/_.eslintignore +0 -7
  69. package/templates/app/quasar-v2/js-vite-2/lint/_.eslintrc.cjs +0 -100
  70. package/templates/app/quasar-v2/js-vite-2/pinia/src/stores/store-flag.d.ts +0 -13
  71. package/templates/app/quasar-v2/js-webpack-4/lint/_.eslintignore +0 -8
  72. package/templates/app/quasar-v2/js-webpack-4/lint/_.eslintrc.cjs +0 -101
  73. package/templates/app/quasar-v2/ts-vite-2/lint/_.eslintignore +0 -7
  74. package/templates/app/quasar-v2/ts-vite-2/lint/_.eslintrc.cjs +0 -135
  75. package/templates/app/quasar-v2/ts-vite-2/prettier/_.prettierrc +0 -4
  76. package/templates/app/quasar-v2/ts-webpack-4/lint/_.eslintignore +0 -8
  77. package/templates/app/quasar-v2/ts-webpack-4/lint/_.eslintrc.cjs +0 -139
  78. package/templates/app/quasar-v2/ts-webpack-4/prettier/_.prettierrc +0 -4
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/prettierrc",
3
+ "semi": false,
4
+ "singleQuote": true,
5
+ "printWidth": 100
6
+ }
@@ -15,7 +15,7 @@ module.exports = {
15
15
  'sfcStyle',
16
16
  'css',
17
17
  'preset',
18
- 'lintConfig'
18
+ 'prettier'
19
19
  ]
20
20
  }
21
21
  }
@@ -13,7 +13,7 @@ npm install
13
13
  ```bash
14
14
  quasar dev
15
15
  ```
16
- <% if (preset.lint) { %>
16
+ <% if (preset.eslint) { %>
17
17
 
18
18
  ### Lint the files
19
19
  ```bash
@@ -21,7 +21,7 @@ yarn lint
21
21
  # or
22
22
  npm run lint
23
23
  ```
24
- <% if (lintConfig === 'prettier') { %>
24
+ <% if (prettier) { %>
25
25
 
26
26
  ### Format the files
27
27
  ```bash
@@ -29,8 +29,7 @@ yarn format
29
29
  # or
30
30
  npm run format
31
31
  ```
32
- <% } %>
33
- <% } %>
32
+ <% } } %>
34
33
 
35
34
  ### Build the app for production
36
35
  ```bash
@@ -1,9 +1,7 @@
1
- root = true
2
-
3
- [*]
1
+ [*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
4
2
  charset = utf-8
5
- indent_style = space
6
3
  indent_size = 2
4
+ indent_style = space
7
5
  end_of_line = lf
8
6
  insert_final_newline = true
9
7
  trim_trailing_whitespace = true
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "recommendations": [
3
- <% if (preset.lint) { %>"dbaeumer.vscode-eslint",
4
- <% if (lintConfig === 'prettier') { %>"esbenp.prettier-vscode",<% } } %>
3
+ <% if (preset.eslint) { %>"dbaeumer.vscode-eslint",<% } %>
4
+ <% if (prettier) { %>"esbenp.prettier-vscode",<% } %>
5
5
  "editorconfig.editorconfig",
6
6
  "vue.volar",
7
7
  "wayou.vscode-todo-highlight"
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "editor.bracketPairColorization.enabled": true,
3
- "editor.guides.bracketPairs": true,<% if (preset.lint) { %>
3
+ "editor.guides.bracketPairs": true,<% if (preset.eslint) { %>
4
4
  "editor.formatOnSave": true,
5
- "editor.defaultFormatter": <% if (lintConfig === 'prettier') { %>"esbenp.prettier-vscode"<% } else { %>"dbaeumer.vscode-eslint"<% } %>,
5
+ "editor.defaultFormatter": <% if (prettier) { %>"esbenp.prettier-vscode"<% } else { %>"dbaeumer.vscode-eslint"<% } %>,
6
6
  "editor.codeActionsOnSave": [
7
7
  "source.fixAll.eslint"
8
8
  ],
@@ -5,10 +5,10 @@
5
5
  "productName": "<%= productName %>",
6
6
  "author": "<%= author %>",
7
7
  "private": true,
8
+ "type": "module",
8
9
  "scripts": {
9
- <% if (preset.lint) { %>"lint": "eslint --ext .js,.ts,.vue ./",
10
- <% if (lintConfig === 'prettier') { %>"format": "prettier --write \"**/*.{js,ts,vue,<% if (css !== 'sass') { %><%= css %><% } %>,html,md,json}\" --ignore-path .gitignore",<% } %>
11
- <% } %>
10
+ <% if (preset.eslint) { %>"lint": "eslint -c ./eslint.config.js './src*/**/*.{ts,js,cjs,mjs,vue}'",<% } %>
11
+ <% if (prettier) { %>"format": "prettier --write \"**/*.{js,ts,vue,<% if (css !== 'sass') { %><%= css %><% } %>,html,md,json}\" --ignore-path .gitignore",<% } %>
12
12
  "test": "echo \"No test specified\" && exit 0",
13
13
  "dev": "quasar dev",
14
14
  "build": "quasar build",
@@ -25,28 +25,23 @@
25
25
  "vue-router": "^4.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- <% if (preset.lint) { %>
29
- "@typescript-eslint/eslint-plugin": "^7.16.0",
30
- "@typescript-eslint/parser": "^7.16.0",
31
- "eslint": "^8.57.0",
32
- "eslint-plugin-vue": "^9.0.0",
33
- "eslint-webpack-plugin": "^4.0.1",
34
- <% if (lintConfig === 'standard') { %>
35
- "eslint-config-standard": "^17.0.0",
36
- "eslint-plugin-import": "^2.19.1",
37
- "eslint-plugin-n": "^15.0.0",
38
- "eslint-plugin-promise": "^6.0.0",
39
- <% } else if (lintConfig === 'airbnb') { %>
40
- "eslint-config-airbnb-base": "^15.0.0",
41
- "eslint-plugin-import": "^2.20.1",
42
- <% } else if (lintConfig === 'prettier') { %>
43
- "eslint-config-prettier": "^9.0.0",
44
- "prettier": "^3.0.3",
45
- <% } } %>
28
+ <% if (preset.eslint) { %>
29
+ "@eslint/js": "^9.14.0",
30
+ "eslint": "^9.14.0",
31
+ "eslint-plugin-vue": "^9.30.0",
32
+ "eslint-webpack-plugin": "^4.2.0",
33
+ "@vue/eslint-config-typescript": "^14.1.3",
34
+ "globals": "^15.12.0",
35
+ <% } %>
36
+ <% if (prettier) { %>
37
+ "@vue/eslint-config-prettier": "^10.1.0",
38
+ "prettier": "^3.3.3",
39
+ <% } %>
46
40
  "@types/node": "^20.5.9",
47
- "@quasar/app-webpack": "^4.0.0-rc.1",
41
+ "@quasar/app-webpack": "^4.0.0",
42
+ "autoprefixer": "^10.4.2",
48
43
  "ts-loader": "^9.4.2",
49
- "typescript": "^5.2.2"
44
+ "typescript": "~5.5.3"
50
45
  },
51
46
  "browserslist": [
52
47
  "last 10 Chrome versions",
@@ -60,7 +55,7 @@
60
55
  "last 5 Opera versions"
61
56
  ],
62
57
  "engines": {
63
- "node": "^24 || ^22 || ^20 || ^18",
58
+ "node": "^28 || ^26 || ^24 || ^22 || ^20 || ^18",
64
59
  "npm": ">= 6.13.4",
65
60
  "yarn": ">= 1.21.1"
66
61
  }
@@ -1,5 +1,3 @@
1
- /* eslint-disable */
2
-
3
1
  module.exports = api => {
4
2
  return {
5
3
  presets: [
@@ -1,4 +1,3 @@
1
- /* eslint-disable */
2
1
  // https://github.com/michael-ciniawsky/postcss-load-config
3
2
 
4
3
  module.exports = {
@@ -1,20 +1,14 @@
1
- /* eslint-env node */
2
-
3
1
  // Configuration for your app
4
2
  // https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js
5
3
 
6
- <% if (preset.lint) { %>
4
+ <% if (preset.eslint) { %>
7
5
  /* eslint-disable @typescript-eslint/no-var-requires */
8
- <% if (lintConfig === 'airbnb') { %>
9
- /* eslint func-names: 0 */
10
- /* eslint global-require: 0 */
11
- <% } %>
12
6
  <% } %>
13
7
  import { defineConfig } from '#q-app/wrappers';
14
8
 
15
9
  export default defineConfig((/* ctx */) => {
16
10
  return {
17
- <% if (preset.lint) { %>eslint: {
11
+ <% if (preset.eslint) { %>eslint: {
18
12
  // fix: true,
19
13
  // include: [],
20
14
  // exclude: [],
@@ -78,7 +72,6 @@ export default defineConfig((/* ctx */) => {
78
72
  },
79
73
 
80
74
  // rtl: true, // https://quasar.dev/options/rtl-support
81
- // preloadChunks: true,
82
75
  // showProgress: false,
83
76
  // gzip: true,
84
77
  // analyze: true,
@@ -155,7 +148,6 @@ export default defineConfig((/* ctx */) => {
155
148
  pwa: false
156
149
 
157
150
  // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
158
- // will mess up SSR
159
151
 
160
152
  // pwaExtendGenerateSWOptions (cfg) {},
161
153
  // pwaExtendInjectManifestOptions (cfg) {}
@@ -224,9 +216,15 @@ export default defineConfig((/* ctx */) => {
224
216
  // extendBexScriptsConf (esbuildConf) {},
225
217
  // extendBexManifestJson (json) {},
226
218
 
227
- contentScripts: [
228
- 'my-content-script'
229
- ]
219
+ /**
220
+ * The list of extra scripts (js/ts) not in your bex manifest that you want to
221
+ * compile and use in your browser extension. Maybe dynamic use them?
222
+ *
223
+ * Each entry in the list should be a relative filename to /src-bex/
224
+ *
225
+ * @example [ 'my-script.ts', 'sub-folder/my-other-script.js' ]
226
+ */
227
+ extraScripts: []
230
228
  }
231
229
  }
232
230
  });
@@ -1,5 +1,3 @@
1
- /* eslint-disable */
2
-
3
1
  declare namespace NodeJS {
4
2
  interface ProcessEnv {
5
3
  NODE_ENV: string;
@@ -0,0 +1,94 @@
1
+ import js from '@eslint/js'
2
+ import globals from 'globals'
3
+ import pluginVue from 'eslint-plugin-vue'
4
+ import pluginQuasar from '@quasar/app-webpack/eslint'
5
+ import vueTsEslintConfig from '@vue/eslint-config-typescript'<% if (prettier) { %>
6
+ import prettierSkipFormatting from '@vue/eslint-config-prettier/skip-formatting'<% } %>
7
+
8
+ export default [
9
+ {
10
+ /**
11
+ * Ignore the following files.
12
+ * Please note that pluginQuasar.configs.recommended already ignores
13
+ * the "node_modules" folder for you (and all other Quasar project
14
+ * relevant folders and files).
15
+ *
16
+ * ESLint requires "ignores" key to be the only one in this object
17
+ */
18
+ // ignores: []
19
+ },
20
+
21
+ ...pluginQuasar.configs.recommended(),
22
+ js.configs.recommended,
23
+
24
+ /**
25
+ * https://eslint.vuejs.org
26
+ *
27
+ * pluginVue.configs.base
28
+ * -> Settings and rules to enable correct ESLint parsing.
29
+ * pluginVue.configs[ 'flat/essential']
30
+ * -> base, plus rules to prevent errors or unintended behavior.
31
+ * pluginVue.configs["flat/strongly-recommended"]
32
+ * -> Above, plus rules to considerably improve code readability and/or dev experience.
33
+ * pluginVue.configs["flat/recommended"]
34
+ * -> Above, plus rules to enforce subjective community defaults to ensure consistency.
35
+ */
36
+ ...pluginVue.configs[ 'flat/essential' ],
37
+
38
+ // https://github.com/vuejs/eslint-config-typescript
39
+ ...vueTsEslintConfig({
40
+ // Optional: extend additional configurations from typescript-eslint'.
41
+ // Supports all the configurations in
42
+ // https://typescript-eslint.io/users/configs#recommended-configurations
43
+ extends: [
44
+ // By default, only the recommended rules are enabled.
45
+ 'recommended'
46
+ // You can also manually enable the stylistic rules.
47
+ // "stylistic",
48
+
49
+ // Other utility configurations, such as 'eslintRecommended', (note that it's in camelCase)
50
+ // are also extendable here. But we don't recommend using them directly.
51
+ ]
52
+ }),
53
+
54
+ {
55
+ languageOptions: {
56
+ ecmaVersion: 'latest',
57
+ sourceType: 'module',
58
+
59
+ globals: {
60
+ ...globals.browser,
61
+ ...globals.node, // SSR, Electron, config files
62
+ process: 'readonly', // process.env.*
63
+ ga: 'readonly', // Google Analytics
64
+ cordova: 'readonly',
65
+ Capacitor: 'readonly',
66
+ chrome: 'readonly', // BEX related
67
+ browser: 'readonly' // BEX related
68
+ }
69
+ },
70
+
71
+ // add your custom rules here
72
+ rules: {
73
+ 'prefer-promise-reject-errors': 'off',
74
+ '@typescript-eslint/consistent-type-imports': [
75
+ 'error',
76
+ { prefer: 'type-imports' }
77
+ ],
78
+
79
+ // allow debugger during development only
80
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
81
+ }
82
+ },
83
+
84
+ {
85
+ files: [ 'src-pwa/custom-service-worker.ts' ],
86
+ languageOptions: {
87
+ globals: {
88
+ ...globals.serviceworker
89
+ }
90
+ }
91
+ }<% if (prettier) { %>,
92
+
93
+ prettierSkipFormatting<% } %>
94
+ ]
@@ -8,8 +8,8 @@ export type MessageLanguages = keyof typeof messages;
8
8
  export type MessageSchema = typeof messages["en-US"];
9
9
 
10
10
  // See https://vue-i18n.intlify.dev/guide/advanced/typescript.html#global-resource-schema-type-definition
11
- /* eslint-disable @typescript-eslint/no-empty-interface */
12
- declare module "vue-i18n" {
11
+ /* eslint-disable @typescript-eslint/no-empty-object-type */
12
+ declare module 'vue-i18n' {
13
13
  // define the locale messages schema
14
14
  export interface DefineLocaleMessage extends MessageSchema {}
15
15
 
@@ -19,7 +19,7 @@ declare module "vue-i18n" {
19
19
  // define the number format schema
20
20
  export interface DefineNumberFormat {}
21
21
  }
22
- /* eslint-enable @typescript-eslint/no-empty-interface */
22
+ /* eslint-enable @typescript-eslint/no-empty-object-type */
23
23
 
24
24
  export default defineBoot(({ app }) => {
25
25
  const i18n = createI18n<{ message: MessageSchema }, MessageLanguages>({
@@ -5,7 +5,7 @@ export async function script ({ scope, utils }) {
5
5
  name: 'preset',
6
6
  message: 'Check the features needed for your project:',
7
7
  choices: [
8
- { title: 'Linting (ESLint)', value: 'lint', description: 'recommended', selected: true },
8
+ { title: 'Linting (ESLint)', value: 'eslint', description: 'recommended', selected: true },
9
9
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
10
10
  { title: 'axios', value: 'axios' },
11
11
  { title: 'vue-i18n', value: 'i18n' }
@@ -13,29 +13,24 @@ export async function script ({ scope, utils }) {
13
13
  format: utils.convertArrayToObject
14
14
  },
15
15
  {
16
- type: (_, { preset }) => (preset.lint ? 'select' : null),
17
- name: 'lintConfig',
18
- message: 'Pick an ESLint preset:',
19
- choices: [
20
- { title: 'Prettier', value: 'prettier', description: 'https://github.com/prettier/prettier' },
21
- { title: 'Standard', value: 'standard', description: 'https://github.com/standard/standard' },
22
- { title: 'Airbnb', value: 'airbnb', description: 'https://github.com/airbnb/javascript' }
23
- ]
16
+ type: (_, { preset }) => (preset.eslint ? 'confirm' : null),
17
+ name: 'prettier',
18
+ initial: true,
19
+ message: 'Add Prettier for code formatting?'
24
20
  }
25
21
  ])
26
22
 
23
+ // ensure it's defined since if not selecting ESLint,
24
+ // user won't be asked about it hence it won't be defined
25
+ scope.prettier = scope.prettier || false
26
+
27
27
  utils.createTargetDir(scope)
28
28
  utils.renderTemplate('BASE', scope)
29
29
  utils.renderTemplate(scope.css, scope)
30
30
 
31
31
  if (scope.preset.axios) utils.renderTemplate('axios', scope)
32
32
  if (scope.preset.i18n) utils.renderTemplate('i18n', scope)
33
- if (scope.preset.lint) {
34
- utils.renderTemplate('lint', scope)
35
- if (scope.lintConfig === 'prettier') {
36
- utils.renderTemplate('prettier', scope)
37
- }
38
- }
39
-
33
+ if (scope.preset.eslint) utils.renderTemplate('eslint', scope)
34
+ if (scope.prettier) utils.renderTemplate('prettier', scope)
40
35
  if (scope.preset.pinia) utils.renderTemplate('pinia', scope)
41
36
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/prettierrc",
3
+ "semi": false,
4
+ "singleQuote": true,
5
+ "printWidth": 100
6
+ }
@@ -33,16 +33,16 @@
33
33
  "build": "<%= packageManager?.name ?? 'pnpm' %> run build:code && <%= packageManager?.name ?? 'pnpm' %> run build:templates"<% } else { %>"build": "mkdist ./ --ext=js --declaration --pattern='**' --pattern='!shims-vue.d.ts'"<% } %>
34
34
  },
35
35
  "devDependencies": {
36
- "@quasar/app-vite": "^2.0.0-rc.1",
37
- "@quasar/app-webpack": "^4.0.0-rc.1",
36
+ "@quasar/app-vite": "^2.0.0",
37
+ "@quasar/app-webpack": "^4.0.0",
38
38
  "mkdist": "^1.5.4",
39
39
  "quasar": "^2.16.7",
40
40
  "vue": "^3.4.36",
41
41
  "vue-tsc": "^2.0.29"
42
42
  },
43
43
  "peerDependencies": {
44
- "@quasar/app-vite": "^2.0.0-rc.1",
45
- "@quasar/app-webpack": "^4.0.0-rc.2",
44
+ "@quasar/app-vite": "^2.0.0",
45
+ "@quasar/app-webpack": "^4.0.0",
46
46
  "quasar": "^2.16.0",
47
47
  "vue": "^3.4.0"
48
48
  },
@@ -15,11 +15,11 @@ export default function (api: IndexAPI) {
15
15
  api.compatibleWith('quasar', '^2.0.0');
16
16
 
17
17
  if (api.hasVite) {
18
- api.compatibleWith('@quasar/app-vite', '^2.0.0-rc.1');
18
+ api.compatibleWith('@quasar/app-vite', '^2.0.0');
19
19
  }
20
20
 
21
21
  if (api.hasWebpack) {
22
- api.compatibleWith('@quasar/app-webpack', '^4.0.0-rc.1');
22
+ api.compatibleWith('@quasar/app-webpack', '^4.0.0');
23
23
  }
24
24
 
25
25
  api.extendQuasarConf((conf, api) => {
@@ -20,7 +20,7 @@
20
20
  "<%= pkgName %>": <% if (!packageManager || ['pnpm', 'bun'].includes(packageManager.name)) { %>"workspace:*"<% } else { %>"*"<% } %>
21
21
  },
22
22
  "devDependencies": {
23
- "@quasar/app-vite": "^2.0.0-rc.1",
23
+ "@quasar/app-vite": "^2.0.0",
24
24
  "autoprefixer": "^10.4.20"
25
25
  },
26
26
  "engines": {
@@ -190,6 +190,14 @@ export default defineConfig((/* ctx */) => {
190
190
  // extendBexScriptsConf (esbuildConf) {},
191
191
  // extendBexManifestJson (json) {},
192
192
 
193
+ /**
194
+ * The list of extra scripts (js/ts) not in your bex manifest that you want to
195
+ * compile and use in your browser extension. Maybe dynamic use them?
196
+ *
197
+ * Each entry in the list should be a relative filename to /src-bex/
198
+ *
199
+ * @example [ 'my-script.ts', 'sub-folder/my-other-script.js' ]
200
+ */
193
201
  extraScripts: []
194
202
  },
195
203
  };
@@ -20,7 +20,7 @@
20
20
  "<%= pkgName %>": <% if (!packageManager || ['pnpm', 'bun'].includes(packageManager?.name)) { %>"workspace:*"<% } else { %>"*"<% } %>
21
21
  },
22
22
  "devDependencies": {
23
- "@quasar/app-webpack": "^4.0.0-rc.1",
23
+ "@quasar/app-webpack": "^4.0.0",
24
24
  "ts-loader": "^9.5.1"
25
25
  },
26
26
  "browserslist": [
@@ -14,11 +14,11 @@ export default function (api: InstallAPI) {
14
14
  api.compatibleWith('quasar', '^2.0.0');
15
15
 
16
16
  if (api.hasVite) {
17
- api.compatibleWith('@quasar/app-vite', '^2.0.0-rc.1');
17
+ api.compatibleWith('@quasar/app-vite', '^2.0.0');
18
18
  }
19
19
 
20
20
  if (api.hasWebpack) {
21
- api.compatibleWith('@quasar/app-webpack', '^4.0.0-rc.1');
21
+ api.compatibleWith('@quasar/app-webpack', '^4.0.0');
22
22
  }
23
23
 
24
24
  api.render('./templates/base', api.prompts);
@@ -29,10 +29,10 @@ function extendConf (conf, api) {
29
29
  api.compatibleWith('quasar', '^2.0.0')
30
30
 
31
31
  if (api.hasVite) {
32
- api.compatibleWith('@quasar/app-vite', '^1.5.0 || ^2.0.0-rc.1')
32
+ api.compatibleWith('@quasar/app-vite', '^1.5.0 || ^2.0.0')
33
33
  }
34
34
  else if (api.hasWebpack) {
35
- api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0-rc.1')
35
+ api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0')
36
36
  }
37
37
 
38
38
  <% if (features.component) { %>
@@ -11,9 +11,9 @@
11
11
  api.compatibleWith('quasar', '^2.0.0')
12
12
 
13
13
  if (api.hasVite) {
14
- api.compatibleWith('@quasar/app-vite', '^1.0.0 || ^2.0.0-rc.1')
14
+ api.compatibleWith('@quasar/app-vite', '^1.0.0 || ^2.0.0')
15
15
  }
16
16
  else if (api.hasWebpack) {
17
- api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0-rc.1')
17
+ api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0')
18
18
  }
19
19
  }
package/utils/index.js CHANGED
@@ -6,7 +6,7 @@ import { spawn, execSync as exec } from 'node:child_process'
6
6
  import { emptyDirSync, ensureDirSync, ensureFileSync, copySync } from 'fs-extra/esm'
7
7
  import promptUser from 'prompts'
8
8
  import compileTemplate from 'lodash/template.js'
9
- import fglob from 'fast-glob'
9
+ import { globSync } from 'tinyglobby'
10
10
  import { yellow, green } from 'kolorist'
11
11
 
12
12
  import logger from './logger.js'
@@ -66,7 +66,7 @@ function getCallerPath () {
66
66
 
67
67
  function renderTemplate (relativePath, scope) {
68
68
  const templateDir = join(getCallerPath(), relativePath)
69
- const files = fglob.sync([ '**/*' ], { cwd: templateDir })
69
+ const files = globSync([ '**/*' ], { cwd: templateDir })
70
70
 
71
71
  for (const rawPath of files) {
72
72
  const targetRelativePath = rawPath.split('/').map(name => {
@@ -1,7 +0,0 @@
1
- /dist
2
- /src-capacitor
3
- /src-cordova
4
- /.quasar
5
- /node_modules
6
- .eslintrc.cjs
7
- /quasar.config.*.temporary.compiled*
@@ -1,100 +0,0 @@
1
- module.exports = {
2
- // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
3
- // This option interrupts the configuration hierarchy at this file
4
- // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
5
- root: true,
6
-
7
- parserOptions: {
8
- ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features
9
- },
10
-
11
- env: {
12
- node: true,
13
- browser: true,
14
- },
15
-
16
- // Rules order is important, please avoid shuffling them
17
- extends: [
18
- // Base ESLint recommended rules
19
- // 'eslint:recommended',
20
-
21
- // Uncomment any of the lines below to choose desired strictness,
22
- // but leave only one uncommented!
23
- // See https://eslint.vuejs.org/rules/#available-rules
24
- 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
25
- // 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
26
- // 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
27
-
28
- <% if (lintConfig === 'standard') { %>'standard'
29
- <% } else if (lintConfig === 'airbnb') { %>'airbnb-base'
30
- <% } else if (lintConfig === 'prettier') { %>// https://github.com/prettier/eslint-config-prettier#installation
31
- // usage with Prettier, provided by 'eslint-config-prettier'.
32
- 'prettier'<% } %>
33
- ],
34
-
35
- plugins: [
36
- // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
37
- // required to lint *.vue files
38
- 'vue',
39
- <% if (lintConfig === 'prettier') { %>
40
- // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
41
- // Prettier has not been included as plugin to avoid performance impact
42
- // add it as an extension for your IDE
43
- <% } %>
44
- ],
45
-
46
- globals: {
47
- ga: 'readonly', // Google Analytics
48
- cordova: 'readonly',
49
- __statics: 'readonly',
50
- __QUASAR_SSR__: 'readonly',
51
- __QUASAR_SSR_SERVER__: 'readonly',
52
- __QUASAR_SSR_CLIENT__: 'readonly',
53
- __QUASAR_SSR_PWA__: 'readonly',
54
- process: 'readonly',
55
- Capacitor: 'readonly',
56
- chrome: 'readonly'
57
- },
58
-
59
- // add your custom rules here
60
- rules: {
61
- <% if (lintConfig === 'standard') { %>
62
- // allow async-await
63
- 'generator-star-spacing': 'off',
64
- // allow paren-less arrow functions
65
- 'arrow-parens': 'off',
66
- 'one-var': 'off',
67
- 'no-void': 'off',
68
- 'multiline-ternary': 'off',
69
-
70
- 'import/first': 'off',
71
- 'import/named': 'error',
72
- 'import/namespace': 'error',
73
- 'import/default': 'error',
74
- 'import/export': 'error',
75
- 'import/extensions': 'off',
76
- 'import/no-unresolved': 'off',
77
- 'import/no-extraneous-dependencies': 'off',
78
- <% } else if (lintConfig === 'airbnb') { %>
79
- 'no-plusplus': 'off',
80
- 'no-param-reassign': 'off',
81
- 'no-void': 'off',
82
- 'no-nested-ternary': 'off',
83
- 'max-classes-per-file': 'off',
84
-
85
- 'import/first': 'off',
86
- 'import/named': 'error',
87
- 'import/namespace': 'error',
88
- 'import/default': 'error',
89
- 'import/export': 'error',
90
- 'import/extensions': 'off',
91
- 'import/no-unresolved': 'off',
92
- 'import/no-extraneous-dependencies': 'off',
93
- 'import/prefer-default-export': 'off',
94
- <% } %>
95
- 'prefer-promise-reject-errors': 'off',
96
-
97
- // allow debugger during development only
98
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
99
- }
100
- }