create-quasar 1.3.0 → 1.4.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 (31) hide show
  1. package/package.json +1 -1
  2. package/templates/app/quasar-v2/index.js +2 -2
  3. package/templates/app/quasar-v2/js-vite-beta/BASE/quasar.config.js +36 -28
  4. package/templates/app/quasar-v2/js-webpack-beta/BASE/{src/index.template.html → index.html} +1 -2
  5. package/templates/app/quasar-v2/js-webpack-beta/BASE/quasar.config.js +76 -107
  6. package/templates/app/quasar-v2/js-webpack-beta/BASE/src/router/index.js +1 -1
  7. package/templates/app/quasar-v2/ts-vite-beta/BASE/quasar.config.ts +36 -28
  8. package/templates/app/quasar-v2/ts-webpack-beta/BASE/{src/index.template.html → index.html} +1 -2
  9. package/templates/app/quasar-v2/ts-webpack-beta/BASE/quasar.config.ts +70 -72
  10. package/templates/app/quasar-v2/ts-webpack-beta/BASE/src/router/index.ts +1 -3
  11. package/templates/app-extension/ae-v1-esm/.eslintrc.js +35 -0
  12. package/templates/app-extension/ae-v1-esm/BASE/README.md +36 -0
  13. package/templates/app-extension/ae-v1-esm/BASE/_.gitignore +14 -0
  14. package/templates/app-extension/ae-v1-esm/BASE/_package.json +24 -0
  15. package/templates/app-extension/ae-v1-esm/BASE/src/index.js +11 -0
  16. package/templates/app-extension/ae-v1-esm/BASE/src/templates/_.gitkeep +0 -0
  17. package/templates/app-extension/ae-v1-esm/index.js +85 -0
  18. package/templates/app-extension/ae-v1-esm/install-script/install.js +10 -0
  19. package/templates/app-extension/ae-v1-esm/prompts-script/prompts.js +44 -0
  20. package/templates/app-extension/ae-v1-esm/uninstall-script/uninstall.js +10 -0
  21. package/templates/app-extension/index.js +14 -1
  22. /package/templates/app-extension/{ae-v1 → ae-v1-commonjs}/.eslintrc.js +0 -0
  23. /package/templates/app-extension/{ae-v1 → ae-v1-commonjs}/BASE/README.md +0 -0
  24. /package/templates/app-extension/{ae-v1 → ae-v1-commonjs}/BASE/_.gitignore +0 -0
  25. /package/templates/app-extension/{ae-v1 → ae-v1-commonjs}/BASE/_package.json +0 -0
  26. /package/templates/app-extension/{ae-v1 → ae-v1-commonjs}/BASE/src/index.js +0 -0
  27. /package/templates/app-extension/{ae-v1 → ae-v1-commonjs}/BASE/src/templates/_.gitkeep +0 -0
  28. /package/templates/app-extension/{ae-v1 → ae-v1-commonjs}/index.js +0 -0
  29. /package/templates/app-extension/{ae-v1 → ae-v1-commonjs}/install-script/install.js +0 -0
  30. /package/templates/app-extension/{ae-v1 → ae-v1-commonjs}/prompts-script/prompts.js +0 -0
  31. /package/templates/app-extension/{ae-v1 → ae-v1-commonjs}/uninstall-script/uninstall.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-quasar",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Scaffolds Quasar Apps, AppExtensions or UI kits",
5
5
  "author": {
6
6
  "name": "Razvan Stoenescu",
@@ -8,9 +8,9 @@ module.exports = async function ({ scope, utils }) {
8
8
  initial: 0,
9
9
  choices: [
10
10
  { title: 'Quasar App CLI with Vite', value: 'vite', description: 'recommended' },
11
- // { title: 'Quasar App CLI with Vite (BETA; next major version)', value: 'vite-beta', description: 'recommended' },
11
+ // { title: 'Quasar App CLI with Vite 5 (BETA | next major version)', value: 'vite-beta' },
12
12
  { title: 'Quasar App CLI with Webpack', value: 'webpack' }
13
- // { title: 'Quasar App CLI with Webpack (BETA; next major version)', value: 'webpack-beta' }
13
+ // { title: 'Quasar App CLI with Webpack (BETA | next major version)', value: 'webpack-beta' }
14
14
  ]
15
15
  },
16
16
  {
@@ -14,6 +14,7 @@ export default configure((/* ctx */) => {
14
14
  // fix: true,
15
15
  // include: [],
16
16
  // exclude: [],
17
+ // cache: false,
17
18
  // rawOptions: {},
18
19
  warnings: true,
19
20
  errors: true
@@ -126,46 +127,51 @@ export default configure((/* ctx */) => {
126
127
  // rootComponent: 'src/App.vue',
127
128
  // router: 'src/router/index',
128
129
  // store: 'src/store/index',
129
- // registerServiceWorker: 'src-pwa/register-service-worker',
130
- // serviceWorker: 'src-pwa/custom-service-worker',
130
+ // pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
131
+ // pwaServiceWorker: 'src-pwa/custom-service-worker',
131
132
  // pwaManifestFile: 'src-pwa/manifest.json',
132
133
  // electronMain: 'src-electron/electron-main',
133
134
  // electronPreload: 'src-electron/electron-preload'
135
+ // bexManifestFile: 'src-bex/manifest.json
134
136
  // },
135
137
 
136
138
  // https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
137
139
  ssr: {
138
- // ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
139
- // will mess up SSR
140
+ prodPort: 3000, // The default port that the production server should use
141
+ // (gets superseded if process.env.PORT is specified at runtime)
140
142
 
141
- // extendSSRWebserverConf (esbuildConf) {},
142
- // extendPackageJson (json) {},
143
+ middlewares: [
144
+ 'render' // keep this as last one
145
+ ],
143
146
 
144
- pwa: false,
147
+ // extendPackageJson (json) {},
148
+ // extendSSRWebserverConf (esbuildConf) {},
145
149
 
150
+ // manualStoreSerialization: true,
151
+ // manualStoreSsrContextInjection: true,
146
152
  // manualStoreHydration: true,
147
153
  // manualPostHydrationTrigger: true,
148
154
 
149
- prodPort: 3000, // The default port that the production server should use
150
- // (gets superseded if process.env.PORT is specified at runtime)
155
+ pwa: false
151
156
 
152
- middlewares: [
153
- 'render' // keep this as last one
154
- ]
157
+ // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
158
+ // will mess up SSR
159
+
160
+ // pwaExtendGenerateSWOptions (cfg) {},
161
+ // pwaExtendInjectManifestOptions (cfg) {}
155
162
  },
156
163
 
157
164
  // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
158
165
  pwa: {
159
- workboxMode: 'generateSW', // or 'injectManifest'
160
- injectPwaMetaTags: true,
161
- swFilename: 'sw.js',
162
- manifestFilename: 'manifest.json',
163
- useCredentialsForManifestTag: false,
164
- // useFilenameHashes: true,
165
- // extendGenerateSWOptions (cfg) {}
166
- // extendInjectManifestOptions (cfg) {},
167
- // extendManifestJson (json) {}
168
- // extendPWACustomSWConf (esbuildConf) {}
166
+ workboxMode: 'GenerateSW' // 'GenerateSW' or 'InjectManifest'
167
+ // swFilename: 'sw.js',
168
+ // manifestFilename: 'manifest.json'
169
+ // extendManifestJson (json) {},
170
+ // useCredentialsForManifestTag: true,
171
+ // injectPwaMetaTags: false,
172
+ // extendPWACustomSWConf (esbuildConf) {},
173
+ // extendGenerateSWOptions (cfg) {},
174
+ // extendInjectManifestOptions (cfg) {}
169
175
  },
170
176
 
171
177
  // Full list of options: https://v2.quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
@@ -180,8 +186,10 @@ export default configure((/* ctx */) => {
180
186
 
181
187
  // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
182
188
  electron: {
183
- // extendElectronMainConf (esbuildConf)
184
- // extendElectronPreloadConf (esbuildConf)
189
+ // extendElectronMainConf (esbuildConf) {},
190
+ // extendElectronPreloadConf (esbuildConf) {},
191
+
192
+ // extendPackageJson (json) {},
185
193
 
186
194
  // specify the debugging port to use for the Electron app when running in development mode
187
195
  inspectPort: 5858,
@@ -210,12 +218,12 @@ export default configure((/* ctx */) => {
210
218
 
211
219
  // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
212
220
  bex: {
221
+ // extendBexScriptsConf (esbuildConf) {},
222
+ // extendBexManifestJson (json) {},
223
+
213
224
  contentScripts: [
214
225
  'my-content-script'
215
- ],
216
-
217
- // extendBexScriptsConf (esbuildConf) {}
218
- // extendBexManifestJson (json) {}
226
+ ]
219
227
  }
220
228
  }
221
229
  });
@@ -16,7 +16,6 @@
16
16
  <link rel="icon" type="image/ico" href="favicon.ico">
17
17
  </head>
18
18
  <body>
19
- <!-- DO NOT touch the following DIV -->
20
- <div id="q-app"></div>
19
+ <!-- quasar:entry-point -->
21
20
  </body>
22
21
  </html>
@@ -3,19 +3,24 @@
3
3
  // Configuration for your app
4
4
  // https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js
5
5
 
6
- <% if (preset.lint) { %>
7
- import ESLintPlugin from 'eslint-webpack-plugin'
8
- <% if (lintConfig === 'airbnb') { %>
6
+ <% if (preset.lint && lintConfig === 'airbnb') { %>
9
7
  /* eslint func-names: 0 */
10
8
  /* eslint global-require: 0 */
11
9
  <% } %>
12
- <% } %>
13
10
  import { configure } from 'quasar/wrappers';
14
11
 
15
12
  export default configure((ctx) => {
16
13
  return {
17
- // https://v2.quasar.dev/quasar-cli-webpack/supporting-ts
18
- supportTS: false,
14
+ <% if (preset.lint) { %>eslint: {
15
+ // fix: true,
16
+ // include: [],
17
+ // exclude: [],
18
+ // cache: false,
19
+ // rawEsbuildEslintOptions: {},
20
+ // rawWebpackEslintPluginOptions: {},
21
+ warnings: true,
22
+ errors: true
23
+ },<% } %>
19
24
 
20
25
  // https://v2.quasar.dev/quasar-cli-webpack/prefetch-feature
21
26
  // preFetch: true,
@@ -49,15 +54,20 @@ export default configure((ctx) => {
49
54
 
50
55
  // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-build
51
56
  build: {
57
+ // publicPath: '/',
52
58
  vueRouterMode: 'hash', // available values: 'hash', 'history'
53
59
 
54
- // transpile: false,
55
- // publicPath: '/',
60
+ esbuildTarget: {
61
+ browser: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
62
+ node: 'node16'
63
+ },
64
+
65
+ // webpackTranspile: false,
56
66
 
57
67
  // Add dependencies for transpiling with Babel (Array of string/regex)
58
68
  // (from node_modules, which are by default not transpiled).
59
- // Applies only if "transpile" is set to true.
60
- // transpileDependencies: [],
69
+ // Applies only if "webpackTranspile" is set to true.
70
+ // webpackTranspileDependencies: [],
61
71
 
62
72
  // rtl: true, // https://quasar.dev/options/rtl-support
63
73
  // preloadChunks: true,
@@ -69,15 +79,8 @@ export default configure((ctx) => {
69
79
  // extractCSS: false,
70
80
 
71
81
  // https://v2.quasar.dev/quasar-cli-webpack/handling-webpack
72
- // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
73
- <% if (preset.lint) { %>
74
- chainWebpack (chain) {
75
- chain.plugin('eslint-webpack-plugin')
76
- .use(ESLintPlugin, [{ extensions: [ 'js', 'vue' ] }])
77
- }
78
- <% } else { %>
79
- chainWebpack (/* chain */) {}
80
- <% } %>
82
+ // "chain" is a webpack-chain object https://github.com/sorrycc/webpack-chain
83
+ // chainWebpack (/* chain, { isClient, isServer } */) {}
81
84
  },
82
85
 
83
86
  // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-devServer
@@ -85,7 +88,6 @@ export default configure((ctx) => {
85
88
  server: {
86
89
  type: 'http'
87
90
  },
88
- port: 8080,
89
91
  open: true // opens browser window automatically
90
92
  },
91
93
 
@@ -111,86 +113,57 @@ export default configure((ctx) => {
111
113
  // https://quasar.dev/options/animations
112
114
  animations: [],
113
115
 
116
+ // https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#property-sourcefiles
117
+ // sourceFiles: {
118
+ // rootComponent: 'src/App.vue',
119
+ // router: 'src/router/index',
120
+ // store: 'src/store/index',
121
+ // indexHtmlTemplate: 'index.html',
122
+ // pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
123
+ // pwaServiceWorker: 'src-pwa/custom-service-worker',
124
+ // pwaManifestFile: 'src-pwa/manifest.json',
125
+ // electronMain: 'src-electron/electron-main',
126
+ // electronPreload: 'src-electron/electron-preload'
127
+ // bexManifestFile: 'src-bex/manifest.json
128
+ // },
129
+
114
130
  // https://v2.quasar.dev/quasar-cli-webpack/developing-ssr/configuring-ssr
115
131
  ssr: {
116
- pwa: false,
132
+ prodPort: 3000, // The default port that the production server should use
133
+ // (gets superseded if process.env.PORT is specified at runtime)
134
+
135
+ middlewares: [
136
+ 'render' // keep this as last one
137
+ ],
117
138
 
139
+ // extendPackageJson (json) {},
140
+ // extendSSRWebserverConf (esbuildConf) {},
141
+
142
+ // manualStoreSerialization: true,
143
+ // manualStoreSsrContextInjection: true,
118
144
  // manualStoreHydration: true,
119
145
  // manualPostHydrationTrigger: true,
120
146
 
121
- prodPort: 3000, // The default port that the production server should use
122
- // (gets superseded if process.env.PORT is specified at runtime)
147
+ pwa: false
123
148
 
124
- maxAge: 1000 * 60 * 60 * 24 * 30,
125
- // Tell browser when a file from the server should expire from cache (in ms)
149
+ // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
150
+ // will mess up SSR
126
151
 
127
- <% if (preset.lint) { %>
128
- chainWebpackWebserver (chain) {
129
- chain.plugin('eslint-webpack-plugin')
130
- .use(ESLintPlugin, [{ extensions: [ 'js' ] }])
131
- },
132
- <% } else { %>
133
- chainWebpackWebserver (/* chain */) {},
134
- <% } %>
135
-
136
- middlewares: [
137
- ctx.prod ? 'compression' : '',
138
- 'render' // keep this as last one
139
- ]
152
+ // pwaExtendGenerateSWOptions (cfg) {},
153
+ // pwaExtendInjectManifestOptions (cfg) {}
140
154
  },
141
155
 
142
156
  // https://v2.quasar.dev/quasar-cli-webpack/developing-pwa/configuring-pwa
143
157
  pwa: {
144
- workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
145
- workboxOptions: {}, // only for GenerateSW
146
-
147
- // for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts])
148
- // if using workbox in InjectManifest mode
149
- <% if (preset.lint) { %>
150
- chainWebpackCustomSW (chain) {
151
- chain.plugin('eslint-webpack-plugin')
152
- .use(ESLintPlugin, [{ extensions: [ 'js' ] }])
153
- },
154
- <% } else { %>
155
- chainWebpackCustomSW (/* chain */) {},
156
- <% } %>
157
-
158
- manifest: {
159
- name: `<%= productName %>`,
160
- short_name: `<%= productName %>`,
161
- description: `<%= description %>`,
162
- display: 'standalone',
163
- orientation: 'portrait',
164
- background_color: '#ffffff',
165
- theme_color: '#027be3',
166
- icons: [
167
- {
168
- src: 'icons/icon-128x128.png',
169
- sizes: '128x128',
170
- type: 'image/png'
171
- },
172
- {
173
- src: 'icons/icon-192x192.png',
174
- sizes: '192x192',
175
- type: 'image/png'
176
- },
177
- {
178
- src: 'icons/icon-256x256.png',
179
- sizes: '256x256',
180
- type: 'image/png'
181
- },
182
- {
183
- src: 'icons/icon-384x384.png',
184
- sizes: '384x384',
185
- type: 'image/png'
186
- },
187
- {
188
- src: 'icons/icon-512x512.png',
189
- sizes: '512x512',
190
- type: 'image/png'
191
- }
192
- ]
193
- }
158
+ workboxMode: 'GenerateSW' // 'GenerateSW' or 'InjectManifest'
159
+ // swFilename: 'sw.js',
160
+ // manifestFilename: 'manifest.json'
161
+ // extendManifestJson (json) {},
162
+ // useCredentialsForManifestTag: true,
163
+ // injectPwaMetaTags: false,
164
+ // extendPWACustomSWConf (esbuildConf) {},
165
+ // extendGenerateSWOptions (cfg) {},
166
+ // extendInjectManifestOptions (cfg) {}
194
167
  },
195
168
 
196
169
  // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/developing-cordova-apps/configuring-cordova
@@ -205,6 +178,11 @@ export default configure((ctx) => {
205
178
 
206
179
  // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/developing-electron-apps/configuring-electron
207
180
  electron: {
181
+ // extendElectronMainConf (esbuildConf) {},
182
+ // extendElectronPreloadConf (esbuildConf) {},
183
+
184
+ // extendPackageJson (json) {},
185
+
208
186
  // specify the debugging port to use for the Electron app when running in development mode
209
187
  inspectPort: 5858,
210
188
 
@@ -227,26 +205,17 @@ export default configure((ctx) => {
227
205
  // https://www.electron.build/configuration/configuration
228
206
 
229
207
  appId: '<%= name %>'
230
- },
208
+ }
209
+ },
231
210
 
232
- // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
233
- <% if (preset.lint) { %>
234
- chainWebpackMain (chain) {
235
- chain.plugin('eslint-webpack-plugin')
236
- .use(ESLintPlugin, [{ extensions: [ 'js' ] }])
237
- },
238
- <% } else { %>
239
- chainWebpackMain (/* chain */) {},
240
- <% } %>
241
-
242
- <% if (preset.lint) { %>
243
- chainWebpackPreload (chain) {
244
- chain.plugin('eslint-webpack-plugin')
245
- .use(ESLintPlugin, [{ extensions: [ 'js' ] }])
246
- },
247
- <% } else { %>
248
- chainWebpackPreload (/* chain */) {},
249
- <% } %>
211
+ // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/developing-browser-extensions/configuring-bex
212
+ bex: {
213
+ // extendBexScriptsConf (esbuildConf) {},
214
+ // extendBexManifestJson (json) {},
215
+
216
+ contentScripts: [
217
+ 'my-content-script'
218
+ ]
250
219
  }
251
220
  }
252
221
  });
@@ -23,7 +23,7 @@ export default route(function (/* { store, ssrContext } */) {
23
23
  // Leave this as is and make changes in quasar.conf.js instead!
24
24
  // quasar.conf.js -> build -> vueRouterMode
25
25
  // quasar.conf.js -> build -> publicPath
26
- history: createHistory(process.env.MODE === 'ssr' ? void 0 : process.env.VUE_ROUTER_BASE)
26
+ history: createHistory(process.env.VUE_ROUTER_BASE)
27
27
  })
28
28
 
29
29
  return Router
@@ -15,6 +15,7 @@ export default configure((/* ctx */) => {
15
15
  // fix: true,
16
16
  // include: [],
17
17
  // exclude: [],
18
+ // cache: false,
18
19
  // rawOptions: {},
19
20
  warnings: true,
20
21
  errors: true
@@ -127,46 +128,51 @@ export default configure((/* ctx */) => {
127
128
  // rootComponent: 'src/App.vue',
128
129
  // router: 'src/router/index',
129
130
  // store: 'src/store/index',
130
- // registerServiceWorker: 'src-pwa/register-service-worker',
131
- // serviceWorker: 'src-pwa/custom-service-worker',
131
+ // pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
132
+ // pwaServiceWorker: 'src-pwa/custom-service-worker',
132
133
  // pwaManifestFile: 'src-pwa/manifest.json',
133
134
  // electronMain: 'src-electron/electron-main',
134
135
  // electronPreload: 'src-electron/electron-preload'
136
+ // bexManifestFile: 'src-bex/manifest.json
135
137
  // },
136
138
 
137
139
  // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
138
140
  ssr: {
139
- // ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
140
- // will mess up SSR
141
+ prodPort: 3000, // The default port that the production server should use
142
+ // (gets superseded if process.env.PORT is specified at runtime)
141
143
 
142
- // extendSSRWebserverConf (esbuildConf) {},
143
- // extendPackageJson (json) {},
144
+ middlewares: [
145
+ 'render' // keep this as last one
146
+ ],
144
147
 
145
- pwa: false,
148
+ // extendPackageJson (json) {},
149
+ // extendSSRWebserverConf (esbuildConf) {},
146
150
 
151
+ // manualStoreSerialization: true,
152
+ // manualStoreSsrContextInjection: true,
147
153
  // manualStoreHydration: true,
148
154
  // manualPostHydrationTrigger: true,
149
155
 
150
- prodPort: 3000, // The default port that the production server should use
151
- // (gets superseded if process.env.PORT is specified at runtime)
156
+ pwa: false
152
157
 
153
- middlewares: [
154
- 'render' // keep this as last one
155
- ]
158
+ // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
159
+ // will mess up SSR
160
+
161
+ // pwaExtendGenerateSWOptions (cfg) {},
162
+ // pwaExtendInjectManifestOptions (cfg) {}
156
163
  },
157
164
 
158
165
  // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
159
166
  pwa: {
160
- workboxMode: 'generateSW', // or 'injectManifest'
161
- injectPwaMetaTags: true,
162
- swFilename: 'sw.js',
163
- manifestFilename: 'manifest.json',
164
- useCredentialsForManifestTag: false,
165
- // useFilenameHashes: true,
166
- // extendGenerateSWOptions (cfg) {}
167
- // extendInjectManifestOptions (cfg) {},
168
- // extendManifestJson (json) {}
169
- // extendPWACustomSWConf (esbuildConf) {}
167
+ workboxMode: 'GenerateSW' // 'GenerateSW' or 'InjectManifest'
168
+ // swFilename: 'sw.js',
169
+ // manifestFilename: 'manifest.json'
170
+ // extendManifestJson (json) {},
171
+ // useCredentialsForManifestTag: true,
172
+ // injectPwaMetaTags: false,
173
+ // extendPWACustomSWConf (esbuildConf) {},
174
+ // extendGenerateSWOptions (cfg) {},
175
+ // extendInjectManifestOptions (cfg) {}
170
176
  },
171
177
 
172
178
  // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
@@ -181,8 +187,10 @@ export default configure((/* ctx */) => {
181
187
 
182
188
  // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
183
189
  electron: {
184
- // extendElectronMainConf (esbuildConf)
185
- // extendElectronPreloadConf (esbuildConf)
190
+ // extendElectronMainConf (esbuildConf) {},
191
+ // extendElectronPreloadConf (esbuildConf) {},
192
+
193
+ // extendPackageJson (json) {},
186
194
 
187
195
  // specify the debugging port to use for the Electron app when running in development mode
188
196
  inspectPort: 5858,
@@ -211,12 +219,12 @@ export default configure((/* ctx */) => {
211
219
 
212
220
  // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
213
221
  bex: {
222
+ // extendBexScriptsConf (esbuildConf) {},
223
+ // extendBexManifestJson (json) {},
224
+
214
225
  contentScripts: [
215
226
  'my-content-script'
216
- ],
217
-
218
- // extendBexScriptsConf (esbuildConf) {}
219
- // extendBexManifestJson (json) {}
227
+ ]
220
228
  }
221
229
  }
222
230
  });
@@ -16,7 +16,6 @@
16
16
  <link rel="icon" type="image/ico" href="favicon.ico">
17
17
  </head>
18
18
  <body>
19
- <!-- DO NOT touch the following DIV -->
20
- <div id="q-app"></div>
19
+ <!-- quasar:entry-point -->
21
20
  </body>
22
21
  </html>
@@ -14,6 +14,16 @@ import { configure } from 'quasar/wrappers';
14
14
 
15
15
  export default configure((ctx) => {
16
16
  return {
17
+ <% if (preset.lint) { %>eslint: {
18
+ // fix: true,
19
+ // include: [],
20
+ // exclude: [],
21
+ // cache: false,
22
+ // rawEsbuildEslintOptions: {},
23
+ // rawWebpackEslintPluginOptions: {},
24
+ warnings: true,
25
+ errors: true
26
+ },<% } %>
17
27
  // https://v2.quasar.dev/quasar-cli-webpack/prefetch-feature
18
28
  // preFetch: true,
19
29
 
@@ -55,15 +65,16 @@ export default configure((ctx) => {
55
65
  },
56
66
 
57
67
  <% } %>
58
- vueRouterMode: 'hash', // available values: 'hash', 'history'
59
68
 
60
- // transpile: false,
61
69
  // publicPath: '/',
70
+ vueRouterMode: 'hash', // available values: 'hash', 'history'
71
+
72
+ // webpackTranspile: false,
62
73
 
63
74
  // Add dependencies for transpiling with Babel (Array of string/regex)
64
75
  // (from node_modules, which are by default not transpiled).
65
- // Applies only if "transpile" is set to true.
66
- // transpileDependencies: [],
76
+ // Applies only if "webpackTranspile" is set to true.
77
+ // webpackTranspileDependencies: [],
67
78
 
68
79
  // rtl: true, // https://quasar.dev/options/rtl-support
69
80
  // preloadChunks: true,
@@ -75,8 +86,8 @@ export default configure((ctx) => {
75
86
  // extractCSS: false,
76
87
 
77
88
  // https://v2.quasar.dev/quasar-cli-webpack/handling-webpack
78
- // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
79
- // chainWebpack (/* chain */) {}
89
+ // "chain" is a webpack-chain object https://github.com/sorrycc/webpack-chain
90
+ // chainWebpack (/* chain, { isClient, isServer } */) {}
80
91
  },
81
92
 
82
93
  // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-devServer
@@ -84,7 +95,6 @@ export default configure((ctx) => {
84
95
  server: {
85
96
  type: 'http'
86
97
  },
87
- port: 8080,
88
98
  open: true // opens browser window automatically
89
99
  },
90
100
 
@@ -110,72 +120,57 @@ export default configure((ctx) => {
110
120
  // https://quasar.dev/options/animations
111
121
  animations: [],
112
122
 
123
+ // https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#property-sourcefiles
124
+ // sourceFiles: {
125
+ // rootComponent: 'src/App.vue',
126
+ // router: 'src/router/index',
127
+ // store: 'src/store/index',
128
+ // indexHtmlTemplate: 'index.html',
129
+ // pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
130
+ // pwaServiceWorker: 'src-pwa/custom-service-worker',
131
+ // pwaManifestFile: 'src-pwa/manifest.json',
132
+ // electronMain: 'src-electron/electron-main',
133
+ // electronPreload: 'src-electron/electron-preload'
134
+ // bexManifestFile: 'src-bex/manifest.json
135
+ // },
136
+
113
137
  // https://v2.quasar.dev/quasar-cli-webpack/developing-ssr/configuring-ssr
114
138
  ssr: {
115
- pwa: false,
139
+ prodPort: 3000, // The default port that the production server should use
140
+ // (gets superseded if process.env.PORT is specified at runtime)
116
141
 
142
+ middlewares: [
143
+ 'render' // keep this as last one
144
+ ],
145
+
146
+ // extendPackageJson (json) {},
147
+ // extendSSRWebserverConf (esbuildConf) {},
148
+
149
+ // manualStoreSerialization: true,
150
+ // manualStoreSsrContextInjection: true,
117
151
  // manualStoreHydration: true,
118
152
  // manualPostHydrationTrigger: true,
119
153
 
120
- prodPort: 3000, // The default port that the production server should use
121
- // (gets superseded if process.env.PORT is specified at runtime)
122
-
123
- maxAge: 1000 * 60 * 60 * 24 * 30,
124
- // Tell browser when a file from the server should expire from cache (in ms)
154
+ pwa: false
125
155
 
126
- // chainWebpackWebserver (/* chain */) {},
156
+ // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
157
+ // will mess up SSR
127
158
 
128
- middlewares: [
129
- ctx.prod ? 'compression' : '',
130
- 'render' // keep this as last one
131
- ]
159
+ // pwaExtendGenerateSWOptions (cfg) {},
160
+ // pwaExtendInjectManifestOptions (cfg) {}
132
161
  },
133
162
 
134
163
  // https://v2.quasar.dev/quasar-cli-webpack/developing-pwa/configuring-pwa
135
164
  pwa: {
136
- workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
137
- workboxOptions: {}, // only for GenerateSW
138
-
139
- // for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts])
140
- // if using workbox in InjectManifest mode
141
- // chainWebpackCustomSW (/* chain */) {},
142
-
143
- manifest: {
144
- name: `<%= productName %>`,
145
- short_name: `<%= productName %>`,
146
- description: `<% description %>`,
147
- display: 'standalone',
148
- orientation: 'portrait',
149
- background_color: '#ffffff',
150
- theme_color: '#027be3',
151
- icons: [
152
- {
153
- src: 'icons/icon-128x128.png',
154
- sizes: '128x128',
155
- type: 'image/png'
156
- },
157
- {
158
- src: 'icons/icon-192x192.png',
159
- sizes: '192x192',
160
- type: 'image/png'
161
- },
162
- {
163
- src: 'icons/icon-256x256.png',
164
- sizes: '256x256',
165
- type: 'image/png'
166
- },
167
- {
168
- src: 'icons/icon-384x384.png',
169
- sizes: '384x384',
170
- type: 'image/png'
171
- },
172
- {
173
- src: 'icons/icon-512x512.png',
174
- sizes: '512x512',
175
- type: 'image/png'
176
- }
177
- ]
178
- }
165
+ workboxMode: 'GenerateSW' // 'GenerateSW' or 'InjectManifest'
166
+ // swFilename: 'sw.js',
167
+ // manifestFilename: 'manifest.json'
168
+ // extendManifestJson (json) {},
169
+ // useCredentialsForManifestTag: true,
170
+ // injectPwaMetaTags: false,
171
+ // extendPWACustomSWConf (esbuildConf) {},
172
+ // extendGenerateSWOptions (cfg) {},
173
+ // extendInjectManifestOptions (cfg) {}
179
174
  },
180
175
 
181
176
  // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/developing-cordova-apps/configuring-cordova
@@ -190,6 +185,11 @@ export default configure((ctx) => {
190
185
 
191
186
  // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/developing-electron-apps/configuring-electron
192
187
  electron: {
188
+ // extendElectronMainConf (esbuildConf) {},
189
+ // extendElectronPreloadConf (esbuildConf) {},
190
+
191
+ // extendPackageJson (json) {},
192
+
193
193
  // specify the debugging port to use for the Electron app when running in development mode
194
194
  inspectPort: 5858,
195
195
 
@@ -212,19 +212,17 @@ export default configure((ctx) => {
212
212
  // https://www.electron.build/configuration/configuration
213
213
 
214
214
  appId: '<%= name %>'
215
- },
215
+ }
216
+ },
216
217
 
217
- // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
218
- chainWebpackMain (/* chain */) {
219
- // do something with the Electron main process Webpack cfg
220
- // extendWebpackMain also available besides this chainWebpackMain
221
- },
218
+ // Full list of options: https://v2.quasar.dev/quasar-cli-webpack/developing-browser-extensions/configuring-bex
219
+ bex: {
220
+ // extendBexScriptsConf (esbuildConf) {},
221
+ // extendBexManifestJson (json) {},
222
222
 
223
- // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
224
- chainWebpackPreload (/* chain */) {
225
- // do something with the Electron main process Webpack cfg
226
- // extendWebpackPreload also available besides this chainWebpackPreload
227
- }
223
+ contentScripts: [
224
+ 'my-content-script'
225
+ ]
228
226
  }
229
227
  }
230
228
  });
@@ -29,9 +29,7 @@ export default route<% if (preset.vuex) { %><StateInterface><% } %>(function (/*
29
29
  // Leave this as is and make changes in quasar.conf.js instead!
30
30
  // quasar.conf.js -> build -> vueRouterMode
31
31
  // quasar.conf.js -> build -> publicPath
32
- history: createHistory(
33
- process.env.MODE === 'ssr' ? void 0 : process.env.VUE_ROUTER_BASE
34
- ),
32
+ history: createHistory(process.env.VUE_ROUTER_BASE),
35
33
  });
36
34
 
37
35
  return Router;
@@ -0,0 +1,35 @@
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
+ }
@@ -0,0 +1,36 @@
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).
@@ -0,0 +1,14 @@
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
@@ -0,0 +1,24 @@
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
+ "type": "module",
9
+ "module": "src/index.js",
10
+ "scripts": {
11
+ "test": "echo \"No test specified\" && exit 0"
12
+ },
13
+ "repository": {
14
+ "type": "<%= repositoryType %>",
15
+ "url": "<%= repositoryURL %>"
16
+ },
17
+ "bugs": "<%= bugs %>",
18
+ "homepage": "<%= homepage %>",
19
+ "engines": {
20
+ "node": ">= 12.2.0",
21
+ "npm": ">= 5.6.0",
22
+ "yarn": ">= 1.6.0"
23
+ }
24
+ }
@@ -0,0 +1,11 @@
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
+ }
@@ -0,0 +1,85 @@
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
+ }
@@ -0,0 +1,10 @@
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
+ export default function (api) {
9
+ //
10
+ }
@@ -0,0 +1,44 @@
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
+ export default function () {
43
+ return []
44
+ }
@@ -0,0 +1,10 @@
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
+ export default function (api) {
9
+ //
10
+ }
@@ -1,4 +1,17 @@
1
1
  module.exports = async function ({ scope, utils }) {
2
- const script = require('./ae-v1')
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 }`)
3
16
  await script({ scope, utils })
4
17
  }