create-quasar 1.8.2 → 1.8.3

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 (46) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/README.md +7 -1
  3. package/index.js +2 -2
  4. package/package.json +11 -12
  5. package/scripts/create-test-project.ts +6 -2
  6. package/templates/app/quasar-v2/js-vite-2/BASE/_package.json +0 -1
  7. package/templates/app/quasar-v2/js-vite-2/BASE/{postcss.config.cjs → postcss.config.js} +9 -6
  8. package/templates/app/quasar-v2/js-vite-2/index.js +1 -16
  9. package/templates/app/quasar-v2/js-webpack-4/BASE/_package.json +0 -1
  10. package/templates/app/quasar-v2/js-webpack-4/index.js +1 -16
  11. package/templates/app/quasar-v2/ts-vite-2/BASE/_package.json +0 -1
  12. package/templates/app/quasar-v2/ts-vite-2/BASE/{postcss.config.cjs → postcss.config.js} +9 -6
  13. package/templates/app/quasar-v2/ts-vite-2/BASE/src/router/index.ts +1 -3
  14. package/templates/app/quasar-v2/ts-vite-2/index.js +1 -15
  15. package/templates/app/quasar-v2/ts-webpack-4/BASE/_package.json +0 -1
  16. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/router/index.ts +2 -3
  17. package/templates/app/quasar-v2/ts-webpack-4/index.js +1 -15
  18. package/utils/index.js +8 -1
  19. package/templates/app/quasar-v2/js-vite-2/vuex/src/store/index.js +0 -27
  20. package/templates/app/quasar-v2/js-vite-2/vuex/src/store/module-example/actions.js +0 -2
  21. package/templates/app/quasar-v2/js-vite-2/vuex/src/store/module-example/getters.js +0 -2
  22. package/templates/app/quasar-v2/js-vite-2/vuex/src/store/module-example/index.js +0 -12
  23. package/templates/app/quasar-v2/js-vite-2/vuex/src/store/module-example/mutations.js +0 -2
  24. package/templates/app/quasar-v2/js-vite-2/vuex/src/store/module-example/state.js +0 -5
  25. package/templates/app/quasar-v2/js-vite-2/vuex/src/store/store-flag.d.ts +0 -10
  26. package/templates/app/quasar-v2/js-webpack-4/vuex/src/store/index.js +0 -27
  27. package/templates/app/quasar-v2/js-webpack-4/vuex/src/store/module-example/actions.js +0 -2
  28. package/templates/app/quasar-v2/js-webpack-4/vuex/src/store/module-example/getters.js +0 -2
  29. package/templates/app/quasar-v2/js-webpack-4/vuex/src/store/module-example/index.js +0 -12
  30. package/templates/app/quasar-v2/js-webpack-4/vuex/src/store/module-example/mutations.js +0 -2
  31. package/templates/app/quasar-v2/js-webpack-4/vuex/src/store/module-example/state.js +0 -5
  32. package/templates/app/quasar-v2/js-webpack-4/vuex/src/store/store-flag.d.ts +0 -10
  33. package/templates/app/quasar-v2/ts-vite-2/vuex/src/store/index.ts +0 -63
  34. package/templates/app/quasar-v2/ts-vite-2/vuex/src/store/module-example/actions.ts +0 -11
  35. package/templates/app/quasar-v2/ts-vite-2/vuex/src/store/module-example/getters.ts +0 -11
  36. package/templates/app/quasar-v2/ts-vite-2/vuex/src/store/module-example/index.ts +0 -16
  37. package/templates/app/quasar-v2/ts-vite-2/vuex/src/store/module-example/mutations.ts +0 -10
  38. package/templates/app/quasar-v2/ts-vite-2/vuex/src/store/module-example/state.ts +0 -11
  39. package/templates/app/quasar-v2/ts-vite-2/vuex/src/store/store-flag.d.ts +0 -10
  40. package/templates/app/quasar-v2/ts-webpack-4/vuex/src/store/index.ts +0 -63
  41. package/templates/app/quasar-v2/ts-webpack-4/vuex/src/store/module-example/actions.ts +0 -11
  42. package/templates/app/quasar-v2/ts-webpack-4/vuex/src/store/module-example/getters.ts +0 -11
  43. package/templates/app/quasar-v2/ts-webpack-4/vuex/src/store/module-example/index.ts +0 -16
  44. package/templates/app/quasar-v2/ts-webpack-4/vuex/src/store/module-example/mutations.ts +0 -10
  45. package/templates/app/quasar-v2/ts-webpack-4/vuex/src/store/module-example/state.ts +0 -11
  46. package/templates/app/quasar-v2/ts-webpack-4/vuex/src/store/store-flag.d.ts +0 -10
package/.eslintrc.cjs CHANGED
@@ -1,4 +1,5 @@
1
1
  module.exports = {
2
+ // TODO: improve rules, use the ones from the root config by removing `root: true`
2
3
  root: true,
3
4
 
4
5
  parserOptions: {
package/README.md CHANGED
@@ -13,12 +13,17 @@
13
13
  This app is used to scaffold Quasar CLI project folders.
14
14
 
15
15
  ```bash
16
+ npm init quasar
17
+ # or:
16
18
  yarn create quasar
17
19
  # or:
18
- npm init quasar
20
+ pnpm create quasar
21
+ # or:
22
+ bun create quasar
19
23
  ```
20
24
 
21
25
  ## Supporting Quasar
26
+
22
27
  Quasar Framework is an MIT-licensed open source project. Its ongoing development is made possible thanks to the support by these awesome [backers](https://github.com/rstoenescu/quasar-framework/blob/dev/backers.md).
23
28
 
24
29
  **Please read our manifest on [Why donations are important](https://quasar.dev/why-donate)**. If you'd like to become a donator, check out [Quasar Framework's Donator campaign](https://donate.quasar.dev).
@@ -44,6 +49,7 @@ Ask questions at the official community forum: [https://forum.quasar.dev](https:
44
49
  I'm excited if you want to contribute to Quasar under any form (report bugs, write a plugin, fix an issue, write a new feature). Please read the [Contributing Guide](../CONTRIBUTING.md).
45
50
 
46
51
  ## Semver
52
+
47
53
  Quasar is following [Semantic Versioning 2.0](https://semver.org/).
48
54
 
49
55
  ## License
package/index.js CHANGED
@@ -87,9 +87,9 @@ if (scope.skipDepsInstall !== true) {
87
87
  ]
88
88
  : [
89
89
  { title: 'Yes, use Yarn (recommended)', value: 'yarn' },
90
+ { title: 'Yes, use PNPM (recommended)', value: 'pnpm' },
90
91
  { title: 'Yes, use NPM', value: 'npm' },
91
- { title: 'Yes, use PNPM (experimental support)', value: 'pnpm' },
92
- { title: 'Yes, use Bun (experimental support)', value: 'bun' },
92
+ { title: 'Yes, use Bun', value: 'bun' },
93
93
  { title: 'No, I will handle that myself', value: false }
94
94
  ]
95
95
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-quasar",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Scaffolds Quasar Apps, AppExtensions or UI kits",
5
5
  "type": "module",
6
6
  "author": {
@@ -26,10 +26,6 @@
26
26
  "engines": {
27
27
  "node": ">=16"
28
28
  },
29
- "scripts": {
30
- "lint": "eslint --ext .js,.ts ./ --fix",
31
- "create-test-project": "tsx scripts/create-test-project.ts"
32
- },
33
29
  "dependencies": {
34
30
  "fast-glob": "^3.3.2",
35
31
  "fs-extra": "^11.2.0",
@@ -38,13 +34,16 @@
38
34
  "prompts": "^2.4.2"
39
35
  },
40
36
  "devDependencies": {
41
- "@types/lodash": "^4.14.202",
37
+ "@types/lodash": "^4.17.0",
42
38
  "@types/prompts": "^2.4.7",
43
- "@typescript-eslint/eslint-plugin": "^7.1.0",
44
- "@typescript-eslint/parser": "^7.1.0",
45
- "eslint": "^8.57.0",
39
+ "@typescript-eslint/eslint-plugin": "^7.7.1",
40
+ "@typescript-eslint/parser": "^7.7.1",
46
41
  "eslint-plugin-lodash-template": "^1.0.0",
47
- "tsx": "^4.7.0",
48
- "typescript": "^5.2.2"
42
+ "tsx": "^4.7.2",
43
+ "typescript": "^5.4.5"
44
+ },
45
+ "scripts": {
46
+ "lint": "eslint --ext .js,.ts ./ --fix",
47
+ "create-test-project": "tsx scripts/create-test-project.ts"
49
48
  }
50
- }
49
+ }
@@ -1,4 +1,4 @@
1
- import { override } from 'prompts';
1
+ import prompts from 'prompts';
2
2
 
3
3
  type ScriptType = 'js' | 'ts';
4
4
  type AppEngine = 'vite' | 'webpack';
@@ -13,8 +13,12 @@ type CreateProjectOptions = {
13
13
  export async function createProject({ scriptType, appEngine, packageManager }: CreateProjectOptions) {
14
14
  // To bypass Corepack enforcing what's specified in the closest package.json file that has the 'packageManager' field
15
15
  process.env.COREPACK_ENABLE_STRICT = '0';
16
+ // See https://github.com/yarnpkg/yarn/issues/9015
17
+ process.env.SKIP_YARN_COREPACK_CHECK = '1';
18
+ // To alter the behavior to run correctly within this script
19
+ process.env.CREATE_TEST_PROJECT_OVERRIDE = 'true';
16
20
 
17
- override({
21
+ prompts.override({
18
22
  projectType: 'app',
19
23
  projectFolder: 'test-project',
20
24
  overwrite: true,
@@ -18,7 +18,6 @@
18
18
  <% if (preset.axios) { %>"axios": "^1.2.1",<% } %>
19
19
  <% if (preset.i18n) { %>"vue-i18n": "^9.0.0",<% } %>
20
20
  <% if (preset.pinia) { %>"pinia": "^2.0.11",<% } %>
21
- <% if (preset.vuex) { %>"vuex": "^4.0.1",<% } %>
22
21
  "@quasar/extras": "^1.16.4",
23
22
  "quasar": "^2.6.0",
24
23
  "vue": "^3.4.18",
@@ -1,10 +1,13 @@
1
1
  /* eslint-disable */
2
2
  // https://github.com/michael-ciniawsky/postcss-load-config
3
3
 
4
- module.exports = {
4
+ import autoprefixer from 'autoprefixer'
5
+ // import rtlcss from 'postcss-rtlcss'
6
+
7
+ export default {
5
8
  plugins: [
6
9
  // https://github.com/postcss/autoprefixer
7
- require('autoprefixer')({
10
+ autoprefixer({
8
11
  overrideBrowserslist: [
9
12
  'last 4 Chrome versions',
10
13
  'last 4 Firefox versions',
@@ -15,13 +18,13 @@ module.exports = {
15
18
  'last 4 FirefoxAndroid versions',
16
19
  'last 4 iOS versions'
17
20
  ]
18
- })
21
+ }),
19
22
 
20
23
  // https://github.com/elchininet/postcss-rtlcss
21
24
  // If you want to support RTL css, then
22
- // 1. yarn/npm install postcss-rtlcss
25
+ // 1. yarn/pnpm/bun/npm install postcss-rtlcss
23
26
  // 2. optionally set quasar.config.js > framework > lang to an RTL language
24
- // 3. uncomment the following line:
25
- // require('postcss-rtlcss')
27
+ // 3. uncomment the following line (and its import statement above):
28
+ // rtlcss()
26
29
  ]
27
30
  }
@@ -7,23 +7,10 @@ export async function script ({ scope, utils }) {
7
7
  choices: [
8
8
  { title: 'Linting (vite-plugin-checker + ESLint)', value: 'lint', description: 'recommended', selected: true },
9
9
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
10
- { title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
11
10
  { title: 'axios', value: 'axios' },
12
11
  { title: 'vue-i18n', value: 'i18n' }
13
12
  ],
14
- format: values => {
15
- let result = values
16
-
17
- if (values.includes('vuex') && values.includes('pinia')) {
18
- console.log()
19
- utils.logger.warn('Only one state management package can be used. Picking the recommended Pinia and dropping Vuex.')
20
- console.log()
21
-
22
- result = values.filter(entry => entry !== 'vuex')
23
- }
24
-
25
- return utils.convertArrayToObject(result)
26
- }
13
+ format: utils.convertArrayToObject
27
14
  },
28
15
  {
29
16
  type: (_, { preset }) => (preset.lint ? 'select' : null),
@@ -44,7 +31,5 @@ export async function script ({ scope, utils }) {
44
31
  if (scope.preset.axios) utils.renderTemplate('axios', scope)
45
32
  if (scope.preset.i18n) utils.renderTemplate('i18n', scope)
46
33
  if (scope.preset.lint) utils.renderTemplate('lint', scope)
47
-
48
34
  if (scope.preset.pinia) utils.renderTemplate('pinia', scope)
49
- else if (scope.preset.vuex) utils.renderTemplate('vuex', scope)
50
35
  }
@@ -17,7 +17,6 @@
17
17
  <% if (preset.axios) { %>"axios": "^1.2.1",<% } %>
18
18
  <% if (preset.i18n) { %>"vue-i18n": "^9.0.0",<% } %>
19
19
  <% if (preset.pinia) { %>"pinia": "^2.0.11",<% } %>
20
- <% if (preset.vuex) { %>"vuex": "^4.0.1",<% } %>
21
20
  "@quasar/extras": "^1.16.4",
22
21
  "core-js": "^3.31.1",
23
22
  "quasar": "^2.8.0",
@@ -7,23 +7,10 @@ export async function script ({ scope, utils }) {
7
7
  choices: [
8
8
  { title: 'Linting (ESLint)', value: 'lint', description: 'recommended', selected: true },
9
9
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
10
- { title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
11
10
  { title: 'axios', value: 'axios' },
12
11
  { title: 'vue-i18n', value: 'i18n' }
13
12
  ],
14
- format: values => {
15
- let result = values
16
-
17
- if (values.includes('vuex') && values.includes('pinia')) {
18
- console.log()
19
- utils.logger.warn('Only one state management package can be used. Picking the recommended Pinia and dropping Vuex.')
20
- console.log()
21
-
22
- result = values.filter(entry => entry !== 'vuex')
23
- }
24
-
25
- return utils.convertArrayToObject(result)
26
- }
13
+ format: utils.convertArrayToObject
27
14
  },
28
15
  {
29
16
  type: (_, { preset }) => (preset.lint ? 'select' : null),
@@ -44,7 +31,5 @@ export async function script ({ scope, utils }) {
44
31
  if (scope.preset.axios) utils.renderTemplate('axios', scope)
45
32
  if (scope.preset.i18n) utils.renderTemplate('i18n', scope)
46
33
  if (scope.preset.lint) utils.renderTemplate('lint', scope)
47
-
48
34
  if (scope.preset.pinia) utils.renderTemplate('pinia', scope)
49
- else if (scope.preset.vuex) utils.renderTemplate('vuex', scope)
50
35
  }
@@ -18,7 +18,6 @@
18
18
  <% if (preset.axios) { %>"axios": "^1.2.1",<% } %>
19
19
  <% if (preset.i18n) { %>"vue-i18n": "^9.2.2",<% } %>
20
20
  <% if (preset.pinia) { %>"pinia": "^2.0.11",<% } %>
21
- <% if (preset.vuex) { %>"vuex": "^4.0.1",<% } %>
22
21
  "@quasar/extras": "^1.16.4",
23
22
  "quasar": "^2.6.0",
24
23
  "vue": "^3.4.18",
@@ -1,10 +1,13 @@
1
1
  /* eslint-disable */
2
2
  // https://github.com/michael-ciniawsky/postcss-load-config
3
3
 
4
- module.exports = {
4
+ import autoprefixer from 'autoprefixer'
5
+ // import rtlcss from 'postcss-rtlcss'
6
+
7
+ export default {
5
8
  plugins: [
6
9
  // https://github.com/postcss/autoprefixer
7
- require('autoprefixer')({
10
+ autoprefixer({
8
11
  overrideBrowserslist: [
9
12
  'last 4 Chrome versions',
10
13
  'last 4 Firefox versions',
@@ -15,13 +18,13 @@ module.exports = {
15
18
  'last 4 FirefoxAndroid versions',
16
19
  'last 4 iOS versions'
17
20
  ]
18
- })
21
+ }),
19
22
 
20
23
  // https://github.com/elchininet/postcss-rtlcss
21
24
  // If you want to support RTL css, then
22
- // 1. yarn/npm install postcss-rtlcss
25
+ // 1. yarn/pnpm/bun/npm install postcss-rtlcss
23
26
  // 2. optionally set quasar.config.js > framework > lang to an RTL language
24
- // 3. uncomment the following line:
25
- // require('postcss-rtlcss')
27
+ // 3. uncomment the following line (and its import statement above):
28
+ // rtlcss()
26
29
  ]
27
30
  }
@@ -5,8 +5,6 @@ import {
5
5
  createWebHashHistory,
6
6
  createWebHistory,
7
7
  } from 'vue-router';
8
- <% if (preset.vuex) { %>import { StateInterface } from '../store';
9
- <% } %>
10
8
  import routes from './routes';
11
9
 
12
10
  /*
@@ -18,7 +16,7 @@ import routes from './routes';
18
16
  * with the Router instance.
19
17
  */
20
18
 
21
- export default route<% if (preset.vuex) { %><StateInterface><% } %>(function (/* { store, ssrContext } */) {
19
+ export default route(function (/* { store, ssrContext } */) {
22
20
  const createHistory = process.env.SERVER
23
21
  ? createMemoryHistory
24
22
  : (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory);
@@ -7,23 +7,10 @@ export async function script ({ scope, utils }) {
7
7
  choices: [
8
8
  { title: 'Linting (vite-plugin-checker + ESLint + vue-tsc)', value: 'lint', description: 'recommended', selected: true },
9
9
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
10
- { title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
11
10
  { title: 'axios', value: 'axios' },
12
11
  { title: 'vue-i18n', value: 'i18n' }
13
12
  ],
14
- format: values => {
15
- let result = values
16
-
17
- if (values.includes('vuex') && values.includes('pinia')) {
18
- console.log()
19
- utils.logger.warn('Only one state management package can be used. Picking the recommended Pinia and dropping Vuex.')
20
- console.log()
21
-
22
- result = values.filter(entry => entry !== 'vuex')
23
- }
24
-
25
- return utils.convertArrayToObject(result)
26
- }
13
+ format: utils.convertArrayToObject
27
14
  },
28
15
  {
29
16
  type: (_, { preset }) => (preset.lint ? 'select' : null),
@@ -51,5 +38,4 @@ export async function script ({ scope, utils }) {
51
38
  }
52
39
 
53
40
  if (scope.preset.pinia) utils.renderTemplate('pinia', scope)
54
- else if (scope.preset.vuex) utils.renderTemplate('vuex', scope)
55
41
  }
@@ -17,7 +17,6 @@
17
17
  <% if (preset.axios) { %>"axios": "^1.2.1",<% } %>
18
18
  <% if (preset.i18n) { %>"vue-i18n": "^9.2.2",<% } %>
19
19
  <% if (preset.pinia) { %>"pinia": "^2.0.11",<% } %>
20
- <% if (preset.vuex) { %>"vuex": "^4.0.1",<% } %>
21
20
  "@quasar/extras": "^1.16.4",
22
21
  "core-js": "^3.6.5",
23
22
  "quasar": "^2.6.0",
@@ -5,8 +5,7 @@ import {
5
5
  createWebHashHistory,
6
6
  createWebHistory,
7
7
  } from 'vue-router';
8
- <% if (preset.vuex) { %>import { StateInterface } from '../store';
9
- <% } %>import routes from './routes';
8
+ import routes from './routes';
10
9
 
11
10
  /*
12
11
  * If not building with SSR mode, you can
@@ -17,7 +16,7 @@ import {
17
16
  * with the Router instance.
18
17
  */
19
18
 
20
- export default route<% if (preset.vuex) { %><StateInterface><% } %>(function (/* { store, ssrContext } */) {
19
+ export default route(function (/* { store, ssrContext } */) {
21
20
  const createHistory = process.env.SERVER
22
21
  ? createMemoryHistory
23
22
  : (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory);
@@ -7,23 +7,10 @@ export async function script ({ scope, utils }) {
7
7
  choices: [
8
8
  { title: 'Linting (ESLint)', value: 'lint', description: 'recommended', selected: true },
9
9
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
10
- { title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
11
10
  { title: 'axios', value: 'axios' },
12
11
  { title: 'vue-i18n', value: 'i18n' }
13
12
  ],
14
- format: values => {
15
- let result = values
16
-
17
- if (values.includes('vuex') && values.includes('pinia')) {
18
- console.log()
19
- utils.logger.warn('Only one state management package can be used. Picking the recommended Pinia and dropping Vuex.')
20
- console.log()
21
-
22
- result = values.filter(entry => entry !== 'vuex')
23
- }
24
-
25
- return utils.convertArrayToObject(result)
26
- }
13
+ format: utils.convertArrayToObject
27
14
  },
28
15
  {
29
16
  type: (_, { preset }) => (preset.lint ? 'select' : null),
@@ -51,5 +38,4 @@ export async function script ({ scope, utils }) {
51
38
  }
52
39
 
53
40
  if (scope.preset.pinia) utils.renderTemplate('pinia', scope)
54
- else if (scope.preset.vuex) utils.renderTemplate('vuex', scope)
55
41
  }
package/utils/index.js CHANGED
@@ -197,9 +197,16 @@ function runCommand (cmd, args, options) {
197
197
  }
198
198
 
199
199
  function installDeps (scope) {
200
+ const args = [ 'install' ]
201
+ // Related to scripts/create-test-project.ts
202
+ if (process.env.CREATE_TEST_PROJECT_OVERRIDE === 'true') {
203
+ // If we don't use this flag, then the test project will become part of the monorepo and fail to install properly
204
+ args.push('--ignore-workspace')
205
+ }
206
+
200
207
  return runCommand(
201
208
  scope.packageManager,
202
- [ 'install' ],
209
+ args,
203
210
  { cwd: scope.projectFolder }
204
211
  )
205
212
  }
@@ -1,27 +0,0 @@
1
- import { store } from 'quasar/wrappers'
2
- import { createStore } from 'vuex'
3
-
4
- // import example from './module-example'
5
-
6
- /*
7
- * If not building with SSR mode, you can
8
- * directly export the Store instantiation;
9
- *
10
- * The function below can be async too; either use
11
- * async/await or return a Promise which resolves
12
- * with the Store instance.
13
- */
14
-
15
- export default store(function (/* { ssrContext } */) {
16
- const Store = createStore({
17
- modules: {
18
- // example
19
- },
20
-
21
- // enable strict mode (adds overhead!)
22
- // for dev mode and --debug builds only
23
- strict: process.env.DEBUGGING
24
- })
25
-
26
- return Store
27
- })
@@ -1,2 +0,0 @@
1
- export function someAction (/* context */) {
2
- }
@@ -1,2 +0,0 @@
1
- export function someGetter (/* state */) {
2
- }
@@ -1,12 +0,0 @@
1
- import state from './state'
2
- import * as getters from './getters'
3
- import * as mutations from './mutations'
4
- import * as actions from './actions'
5
-
6
- export default {
7
- namespaced: true,
8
- getters,
9
- mutations,
10
- actions,
11
- state
12
- }
@@ -1,2 +0,0 @@
1
- export function someMutation (/* state */) {
2
- }
@@ -1,5 +0,0 @@
1
- export default function () {
2
- return {
3
- //
4
- }
5
- }
@@ -1,10 +0,0 @@
1
- /* eslint-disable */
2
- // THIS FEATURE-FLAG FILE IS AUTOGENERATED,
3
- // REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING
4
- import "quasar/dist/types/feature-flag";
5
-
6
- declare module "quasar/dist/types/feature-flag" {
7
- interface QuasarFeatureFlags {
8
- store: true;
9
- }
10
- }
@@ -1,27 +0,0 @@
1
- import { store } from 'quasar/wrappers'
2
- import { createStore } from 'vuex'
3
-
4
- // import example from './module-example'
5
-
6
- /*
7
- * If not building with SSR mode, you can
8
- * directly export the Store instantiation;
9
- *
10
- * The function below can be async too; either use
11
- * async/await or return a Promise which resolves
12
- * with the Store instance.
13
- */
14
-
15
- export default store(function (/* { ssrContext } */) {
16
- const Store = createStore({
17
- modules: {
18
- // example
19
- },
20
-
21
- // enable strict mode (adds overhead!)
22
- // for dev mode and --debug builds only
23
- strict: process.env.DEBUGGING
24
- })
25
-
26
- return Store
27
- })
@@ -1,2 +0,0 @@
1
- export function someAction (/* context */) {
2
- }
@@ -1,2 +0,0 @@
1
- export function someGetter (/* state */) {
2
- }
@@ -1,12 +0,0 @@
1
- import state from './state'
2
- import * as getters from './getters'
3
- import * as mutations from './mutations'
4
- import * as actions from './actions'
5
-
6
- export default {
7
- namespaced: true,
8
- getters,
9
- mutations,
10
- actions,
11
- state
12
- }
@@ -1,2 +0,0 @@
1
- export function someMutation (/* state */) {
2
- }
@@ -1,5 +0,0 @@
1
- export default function () {
2
- return {
3
- //
4
- }
5
- }
@@ -1,10 +0,0 @@
1
- /* eslint-disable */
2
- // THIS FEATURE-FLAG FILE IS AUTOGENERATED,
3
- // REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING
4
- import "quasar/dist/types/feature-flag";
5
-
6
- declare module "quasar/dist/types/feature-flag" {
7
- interface QuasarFeatureFlags {
8
- store: true;
9
- }
10
- }
@@ -1,63 +0,0 @@
1
- import { store } from 'quasar/wrappers'
2
- import { InjectionKey } from 'vue'
3
- import { Router } from 'vue-router'
4
- import {
5
- createStore,
6
- Store as VuexStore,
7
- useStore as vuexUseStore,
8
- } from 'vuex'
9
-
10
- // import example from './module-example'
11
- // import { ExampleStateInterface } from './module-example/state';
12
-
13
- /*
14
- * If not building with SSR mode, you can
15
- * directly export the Store instantiation;
16
- *
17
- * The function below can be async too; either use
18
- * async/await or return a Promise which resolves
19
- * with the Store instance.
20
- */
21
-
22
- export interface StateInterface {
23
- // Define your own store structure, using submodules if needed
24
- // example: ExampleStateInterface;
25
- // Declared as unknown to avoid linting issue. Best to strongly type as per the line above.
26
- example: unknown
27
- }
28
-
29
- // provide typings for `this.$store`
30
- declare module '@vue/runtime-core' {
31
- interface ComponentCustomProperties {
32
- $store: VuexStore<StateInterface>
33
- }
34
- }
35
-
36
- // provide typings for `useStore` helper
37
- export const storeKey: InjectionKey<VuexStore<StateInterface>> = Symbol('vuex-key')
38
-
39
- // Provide typings for `this.$router` inside Vuex stores
40
- declare module "vuex" {
41
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
42
- export interface Store<S> {
43
- readonly $router: Router;
44
- }
45
- }
46
-
47
- export default store(function (/* { ssrContext } */) {
48
- const Store = createStore<StateInterface>({
49
- modules: {
50
- // example
51
- },
52
-
53
- // enable strict mode (adds overhead!)
54
- // for dev mode and --debug builds only
55
- strict: !!process.env.DEBUGGING
56
- })
57
-
58
- return Store;
59
- })
60
-
61
- export function useStore() {
62
- return vuexUseStore(storeKey)
63
- }
@@ -1,11 +0,0 @@
1
- import { ActionTree } from 'vuex';
2
- import { StateInterface } from '../index';
3
- import { ExampleStateInterface } from './state';
4
-
5
- const actions: ActionTree<ExampleStateInterface, StateInterface> = {
6
- someAction (/* context */) {
7
- // your code
8
- }
9
- };
10
-
11
- export default actions;
@@ -1,11 +0,0 @@
1
- import { GetterTree } from 'vuex';
2
- import { StateInterface } from '../index';
3
- import { ExampleStateInterface } from './state';
4
-
5
- const getters: GetterTree<ExampleStateInterface, StateInterface> = {
6
- someAction (/* context */) {
7
- // your code
8
- }
9
- };
10
-
11
- export default getters;
@@ -1,16 +0,0 @@
1
- import { Module } from 'vuex';
2
- import { StateInterface } from '../index';
3
- import state, { ExampleStateInterface } from './state';
4
- import actions from './actions';
5
- import getters from './getters';
6
- import mutations from './mutations';
7
-
8
- const exampleModule: Module<ExampleStateInterface, StateInterface> = {
9
- namespaced: true,
10
- actions,
11
- getters,
12
- mutations,
13
- state
14
- };
15
-
16
- export default exampleModule;
@@ -1,10 +0,0 @@
1
- import { MutationTree } from 'vuex';
2
- import { ExampleStateInterface } from './state';
3
-
4
- const mutation: MutationTree<ExampleStateInterface> = {
5
- someMutation (/* state: ExampleStateInterface */) {
6
- // your code
7
- }
8
- };
9
-
10
- export default mutation;
@@ -1,11 +0,0 @@
1
- export interface ExampleStateInterface {
2
- prop: boolean;
3
- }
4
-
5
- function state(): ExampleStateInterface {
6
- return {
7
- prop: false
8
- }
9
- }
10
-
11
- export default state;
@@ -1,10 +0,0 @@
1
- /* eslint-disable */
2
- // THIS FEATURE-FLAG FILE IS AUTOGENERATED,
3
- // REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING
4
- import "quasar/dist/types/feature-flag";
5
-
6
- declare module "quasar/dist/types/feature-flag" {
7
- interface QuasarFeatureFlags {
8
- store: true;
9
- }
10
- }
@@ -1,63 +0,0 @@
1
- import { store } from 'quasar/wrappers'
2
- import { InjectionKey } from 'vue'
3
- import { Router } from 'vue-router'
4
- import {
5
- createStore,
6
- Store as VuexStore,
7
- useStore as vuexUseStore,
8
- } from 'vuex'
9
-
10
- // import example from './module-example'
11
- // import { ExampleStateInterface } from './module-example/state';
12
-
13
- /*
14
- * If not building with SSR mode, you can
15
- * directly export the Store instantiation;
16
- *
17
- * The function below can be async too; either use
18
- * async/await or return a Promise which resolves
19
- * with the Store instance.
20
- */
21
-
22
- export interface StateInterface {
23
- // Define your own store structure, using submodules if needed
24
- // example: ExampleStateInterface;
25
- // Declared as unknown to avoid linting issue. Best to strongly type as per the line above.
26
- example: unknown
27
- }
28
-
29
- // provide typings for `this.$store`
30
- declare module '@vue/runtime-core' {
31
- interface ComponentCustomProperties {
32
- $store: VuexStore<StateInterface>
33
- }
34
- }
35
-
36
- // provide typings for `useStore` helper
37
- export const storeKey: InjectionKey<VuexStore<StateInterface>> = Symbol('vuex-key')
38
-
39
- // Provide typings for `this.$router` inside Vuex stores
40
- declare module "vuex" {
41
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
42
- export interface Store<S> {
43
- readonly $router: Router;
44
- }
45
- }
46
-
47
- export default store(function (/* { ssrContext } */) {
48
- const Store = createStore<StateInterface>({
49
- modules: {
50
- // example
51
- },
52
-
53
- // enable strict mode (adds overhead!)
54
- // for dev mode and --debug builds only
55
- strict: !!process.env.DEBUGGING
56
- })
57
-
58
- return Store;
59
- })
60
-
61
- export function useStore() {
62
- return vuexUseStore(storeKey)
63
- }
@@ -1,11 +0,0 @@
1
- import { ActionTree } from 'vuex';
2
- import { StateInterface } from '../index';
3
- import { ExampleStateInterface } from './state';
4
-
5
- const actions: ActionTree<ExampleStateInterface, StateInterface> = {
6
- someAction (/* context */) {
7
- // your code
8
- }
9
- };
10
-
11
- export default actions;
@@ -1,11 +0,0 @@
1
- import { GetterTree } from 'vuex';
2
- import { StateInterface } from '../index';
3
- import { ExampleStateInterface } from './state';
4
-
5
- const getters: GetterTree<ExampleStateInterface, StateInterface> = {
6
- someAction (/* context */) {
7
- // your code
8
- }
9
- };
10
-
11
- export default getters;
@@ -1,16 +0,0 @@
1
- import { Module } from 'vuex';
2
- import { StateInterface } from '../index';
3
- import state, { ExampleStateInterface } from './state';
4
- import actions from './actions';
5
- import getters from './getters';
6
- import mutations from './mutations';
7
-
8
- const exampleModule: Module<ExampleStateInterface, StateInterface> = {
9
- namespaced: true,
10
- actions,
11
- getters,
12
- mutations,
13
- state
14
- };
15
-
16
- export default exampleModule;
@@ -1,10 +0,0 @@
1
- import { MutationTree } from 'vuex';
2
- import { ExampleStateInterface } from './state';
3
-
4
- const mutation: MutationTree<ExampleStateInterface> = {
5
- someMutation (/* state: ExampleStateInterface */) {
6
- // your code
7
- }
8
- };
9
-
10
- export default mutation;
@@ -1,11 +0,0 @@
1
- export interface ExampleStateInterface {
2
- prop: boolean;
3
- }
4
-
5
- function state(): ExampleStateInterface {
6
- return {
7
- prop: false
8
- }
9
- }
10
-
11
- export default state;
@@ -1,10 +0,0 @@
1
- /* eslint-disable */
2
- // THIS FEATURE-FLAG FILE IS AUTOGENERATED,
3
- // REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING
4
- import "quasar/dist/types/feature-flag";
5
-
6
- declare module "quasar/dist/types/feature-flag" {
7
- interface QuasarFeatureFlags {
8
- store: true;
9
- }
10
- }