create-quasar 1.9.3 → 1.10.1
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.
- package/.eslintignore +1 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/templates/.eslintrc.cjs +17 -1
- package/templates/app/quasar-v2/index.js +2 -2
- package/templates/app/quasar-v2/js-vite-2/BASE/_jsconfig.json +1 -37
- package/templates/app/quasar-v2/js-vite-2/BASE/_package.json +3 -2
- package/templates/app/quasar-v2/js-vite-2/BASE/quasar.config.js +3 -6
- package/templates/app/quasar-v2/js-vite-2/BASE/src/App.vue +1 -3
- package/templates/app/quasar-v2/js-vite-2/BASE/src/components/EssentialLink.vue +0 -4
- package/templates/app/quasar-v2/js-vite-2/BASE/src/layouts/MainLayout.vue +0 -4
- package/templates/app/quasar-v2/js-vite-2/BASE/src/pages/ErrorNotFound.vue +1 -3
- package/templates/app/quasar-v2/js-vite-2/BASE/src/pages/IndexPage.vue +1 -3
- package/templates/app/quasar-v2/js-vite-2/BASE/src/router/index.js +2 -2
- package/templates/app/quasar-v2/js-vite-2/axios/src/boot/axios.js +2 -2
- package/templates/app/quasar-v2/js-vite-2/i18n/src/boot/i18n.js +2 -2
- package/templates/app/quasar-v2/js-vite-2/pinia/src/stores/index.js +2 -2
- package/templates/app/quasar-v2/js-webpack-4/BASE/_jsconfig.json +1 -37
- package/templates/app/quasar-v2/js-webpack-4/BASE/_package.json +3 -2
- package/templates/app/quasar-v2/js-webpack-4/BASE/quasar.config.js +2 -2
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/App.vue +1 -3
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/components/EssentialLink.vue +0 -4
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/layouts/MainLayout.vue +0 -4
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/pages/ErrorNotFound.vue +1 -3
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/pages/IndexPage.vue +1 -3
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/router/index.js +2 -2
- package/templates/app/quasar-v2/js-webpack-4/axios/src/boot/axios.js +2 -2
- package/templates/app/quasar-v2/js-webpack-4/i18n/src/boot/i18n.js +2 -2
- package/templates/app/quasar-v2/js-webpack-4/pinia/src/stores/index.js +2 -2
- package/templates/app/quasar-v2/ts-vite-2/BASE/_package.json +3 -2
- package/templates/app/quasar-v2/ts-vite-2/BASE/_tsconfig.json +1 -12
- package/templates/app/quasar-v2/ts-vite-2/BASE/quasar.config.ts +10 -9
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/App.vue +1 -3
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/components/EssentialLink.vue +0 -4
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/components/ExampleComponent.vue +6 -6
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/layouts/MainLayout.vue +3 -7
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/pages/ErrorNotFound.vue +1 -3
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/pages/IndexPage.vue +3 -7
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/router/index.ts +2 -2
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/router/routes.ts +1 -1
- package/templates/app/quasar-v2/ts-vite-2/axios/src/boot/axios.ts +3 -3
- package/templates/app/quasar-v2/ts-vite-2/i18n/src/boot/i18n.ts +2 -2
- package/templates/app/quasar-v2/ts-vite-2/lint/_.eslintrc.cjs +6 -1
- package/templates/app/quasar-v2/ts-vite-2/pinia/src/stores/index.ts +3 -3
- package/templates/app/quasar-v2/ts-webpack-4/BASE/_package.json +3 -2
- package/templates/app/quasar-v2/ts-webpack-4/BASE/_tsconfig.json +1 -12
- package/templates/app/quasar-v2/ts-webpack-4/BASE/quasar.config.ts +8 -2
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/App.vue +1 -3
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/components/EssentialLink.vue +0 -4
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/components/ExampleComponent.vue +6 -6
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/layouts/MainLayout.vue +3 -7
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/pages/ErrorNotFound.vue +1 -3
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/pages/IndexPage.vue +3 -7
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/router/index.ts +2 -2
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/router/routes.ts +1 -1
- package/templates/app/quasar-v2/ts-webpack-4/axios/src/boot/axios.ts +3 -3
- package/templates/app/quasar-v2/ts-webpack-4/i18n/src/boot/i18n.ts +2 -2
- package/templates/app/quasar-v2/ts-webpack-4/lint/_.eslintrc.cjs +6 -1
- package/templates/app/quasar-v2/ts-webpack-4/pinia/src/stores/index.ts +3 -3
- package/templates/app-extension/ae-ts/.eslintrc.cjs +21 -0
- package/templates/app-extension/ae-ts/BASE/README.md +35 -0
- package/templates/app-extension/ae-ts/BASE/_.gitignore +8 -0
- package/templates/app-extension/ae-ts/BASE/_.vscode/extensions.json +9 -0
- package/templates/app-extension/ae-ts/BASE/_.vscode/settings.json +12 -0
- package/templates/app-extension/ae-ts/BASE/_eslint.config.js +107 -0
- package/templates/app-extension/ae-ts/BASE/_package.json +39 -0
- package/templates/app-extension/ae-ts/BASE/_tsconfig.json +30 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/README.md +52 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/_.npmignore +5 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/_package.json +57 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/_tsconfig.json +10 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/src/index.ts +36 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/src/quasar.d.ts +24 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/src/runtime/README.md +46 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/src/runtime/boot/register.ts +6 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/src/runtime/components/MyButton.vue +37 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/src/runtime/components/types.ts +19 -0
- package/templates/app-extension/ae-ts/BASE/app-extension/src/runtime/index.ts +9 -0
- package/templates/{app/quasar-v2/ts-vite-2/BASE/src → app-extension/ae-ts/BASE/app-extension/src/runtime}/quasar.d.ts +0 -2
- package/templates/app-extension/ae-ts/BASE/eslint.d.ts +18 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/README.md +67 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/_.gitignore +37 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/_package.json +29 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/_tsconfig.json +9 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/index.html +44 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/postcss.config.cjs +27 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/public/favicon.ico +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/public/icons/favicon-128x128.png +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/public/icons/favicon-16x16.png +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/public/icons/favicon-32x32.png +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/public/icons/favicon-96x96.png +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/quasar.config.ts +196 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/quasar.extensions.json +3 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/App.vue +3 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/assets/quasar-logo-vertical.svg +15 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/boot/_.gitkeep +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/components/EssentialLink.vue +26 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/css/app.scss +1 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/css/quasar.variables.scss +25 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/env.d.ts +7 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/layouts/MainLayout.vue +94 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/pages/ErrorNotFound.vue +21 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/pages/IndexPage.vue +5 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/quasar.d.ts +10 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/router/index.ts +38 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/router/routes.ts +18 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/shims-vue.d.ts +10 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/README.md +67 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/_.gitignore +32 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/_package.json +40 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/_tsconfig.json +9 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/babel.config.cjs +14 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/index.html +44 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/postcss.config.cjs +8 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/public/favicon.ico +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/public/icons/favicon-128x128.png +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/public/icons/favicon-16x16.png +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/public/icons/favicon-32x32.png +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/public/icons/favicon-96x96.png +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/quasar.config.ts +207 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/quasar.extensions.json +3 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/App.vue +3 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/assets/quasar-logo-vertical.svg +15 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/boot/_.gitkeep +0 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/components/EssentialLink.vue +26 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/css/app.scss +1 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/css/quasar.variables.scss +25 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/env.d.ts +7 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/layouts/MainLayout.vue +92 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/pages/ErrorNotFound.vue +21 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/pages/IndexPage.vue +5 -0
- package/templates/{app/quasar-v2/ts-webpack-4/BASE → app-extension/ae-ts/BASE/playground/quasar-cli-webpack}/src/quasar.d.ts +3 -2
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/router/index.ts +37 -0
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/router/routes.ts +18 -0
- package/templates/app-extension/ae-ts/index.js +98 -0
- package/templates/app-extension/ae-ts/install-script/app-extension/src/install.ts +25 -0
- package/templates/app-extension/ae-ts/install-script/app-extension/src/templates/README.md +27 -0
- package/templates/app-extension/ae-ts/install-script/app-extension/src/templates/_.gitkeep +0 -0
- package/templates/app-extension/ae-ts/install-script/app-extension/src/templates/base/_.gitkeep +0 -0
- package/templates/app-extension/ae-ts/pnpm/_pnpm-workspace.yaml +3 -0
- package/templates/app-extension/ae-ts/prompts-script/app-extension/src/prompts.ts +46 -0
- package/templates/app-extension/ae-ts/uninstall-script/app-extension/src/uninstall.ts +11 -0
- package/templates/app-extension/index.js +12 -1
- package/templates/ui-kit/quasar-v2/ae/app-extension/src/index.js +2 -2
- package/templates/ui-kit/quasar-v2/ae-install/app-extension/src/install.js +2 -2
- package/utils/index.js +14 -7
- package/templates/app/quasar-v2/ts-vite-2/lint/_tsconfig.vue-tsc.json +0 -6
- package/templates/app/quasar-v2/ts-vite-2/pinia/src/stores/store-flag.d.ts +0 -13
- package/templates/app/quasar-v2/ts-webpack-4/pinia/src/stores/store-flag.d.ts +0 -13
- /package/templates/app/quasar-v2/ts-vite-2/BASE/{postcss.config.mjs → postcss.config.js} +0 -0
- /package/templates/app-extension/{ae-v1 → ae-js}/.eslintrc.cjs +0 -0
- /package/templates/app-extension/{ae-v1 → ae-js}/BASE/README.md +0 -0
- /package/templates/app-extension/{ae-v1 → ae-js}/BASE/_.gitignore +0 -0
- /package/templates/app-extension/{ae-v1 → ae-js}/BASE/_package.json +0 -0
- /package/templates/app-extension/{ae-v1 → ae-js}/BASE/src/index.js +0 -0
- /package/templates/app-extension/{ae-v1 → ae-js}/BASE/src/templates/_.gitkeep +0 -0
- /package/templates/app-extension/{ae-v1 → ae-js}/index.js +0 -0
- /package/templates/app-extension/{ae-v1 → ae-js}/install-script/src/install.js +0 -0
- /package/templates/app-extension/{ae-v1 → ae-js}/prompts-script/src/prompts.js +0 -0
- /package/templates/app-extension/{ae-v1 → ae-js}/uninstall-script/src/uninstall.js +0 -0
- /package/templates/{app/quasar-v2/ts-vite-2/BASE/src → app-extension/ae-ts/BASE/app-extension/src/runtime}/shims-vue.d.ts +0 -0
- /package/templates/{app/quasar-v2/ts-webpack-4/BASE → app-extension/ae-ts/BASE/playground/quasar-cli-webpack}/src/shims-vue.d.ts +0 -0
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
<% if (sfcStyle === 'composition-setup') { %>
|
|
25
25
|
<script setup lang="ts">
|
|
26
|
-
|
|
27
|
-
name: 'ErrorNotFound'
|
|
28
|
-
});
|
|
26
|
+
//
|
|
29
27
|
</script><% } else if (sfcStyle === 'composition' || sfcStyle === 'options') { %>
|
|
30
28
|
<script lang="ts">
|
|
31
29
|
import { defineComponent } from 'vue';
|
|
@@ -11,13 +11,9 @@
|
|
|
11
11
|
<% if (sfcStyle === 'composition-setup') { %>
|
|
12
12
|
<script setup lang="ts">
|
|
13
13
|
import { ref } from 'vue';
|
|
14
|
-
import { Todo, Meta } from 'components/models';
|
|
14
|
+
import type { Todo, Meta } from 'components/models';
|
|
15
15
|
import ExampleComponent from 'components/ExampleComponent.vue';
|
|
16
16
|
|
|
17
|
-
defineOptions({
|
|
18
|
-
name: 'IndexPage'
|
|
19
|
-
});
|
|
20
|
-
|
|
21
17
|
const todos = ref<Todo[]>([
|
|
22
18
|
{
|
|
23
19
|
id: 1,
|
|
@@ -47,7 +43,7 @@ const meta = ref<Meta>({
|
|
|
47
43
|
</script><% } else if (sfcStyle === 'composition') { %>
|
|
48
44
|
<script lang="ts">
|
|
49
45
|
import { defineComponent, ref } from 'vue';
|
|
50
|
-
import { Todo, Meta } from 'components/models';
|
|
46
|
+
import type { Todo, Meta } from 'components/models';
|
|
51
47
|
import ExampleComponent from 'components/ExampleComponent.vue';
|
|
52
48
|
|
|
53
49
|
export default defineComponent({
|
|
@@ -91,7 +87,7 @@ export default defineComponent({
|
|
|
91
87
|
</script><% } else if (sfcStyle === 'options') { %>
|
|
92
88
|
<script lang="ts">
|
|
93
89
|
import { defineComponent } from 'vue';
|
|
94
|
-
import { Todo, Meta } from 'components/models';
|
|
90
|
+
import type { Todo, Meta } from 'components/models';
|
|
95
91
|
import ExampleComponent from 'components/ExampleComponent.vue';
|
|
96
92
|
|
|
97
93
|
export default defineComponent({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineRouter } from '#q-app/wrappers';
|
|
2
2
|
import {
|
|
3
3
|
createMemoryHistory,
|
|
4
4
|
createRouter,
|
|
@@ -16,7 +16,7 @@ import routes from './routes';
|
|
|
16
16
|
* with the Router instance.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
export default
|
|
19
|
+
export default defineRouter(function (/* { store, ssrContext } */) {
|
|
20
20
|
const createHistory = process.env.SERVER
|
|
21
21
|
? createMemoryHistory
|
|
22
22
|
: (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import axios, { AxiosInstance } from 'axios';
|
|
1
|
+
import { defineBoot } from '#q-app/wrappers';
|
|
2
|
+
import axios, { type AxiosInstance } from 'axios';
|
|
3
3
|
|
|
4
4
|
declare module 'vue' {
|
|
5
5
|
interface ComponentCustomProperties {
|
|
@@ -16,7 +16,7 @@ declare module 'vue' {
|
|
|
16
16
|
// for each client)
|
|
17
17
|
const api = axios.create({ baseURL: 'https://api.example.com' });
|
|
18
18
|
|
|
19
|
-
export default
|
|
19
|
+
export default defineBoot(({ app }) => {
|
|
20
20
|
// for use inside Vue files (Options API) through this.$axios and this.$api
|
|
21
21
|
|
|
22
22
|
app.config.globalProperties.$axios = axios;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineBoot } from '#q-app/wrappers';
|
|
2
2
|
import { createI18n } from 'vue-i18n';
|
|
3
3
|
|
|
4
4
|
import messages from 'src/i18n';
|
|
@@ -21,7 +21,7 @@ declare module 'vue-i18n' {
|
|
|
21
21
|
}
|
|
22
22
|
/* eslint-enable @typescript-eslint/no-empty-interface */
|
|
23
23
|
|
|
24
|
-
export default
|
|
24
|
+
export default defineBoot(({ app }) => {
|
|
25
25
|
const i18n = createI18n({
|
|
26
26
|
locale: 'en-US',<% if (sfcStyle === 'composition' || sfcStyle === 'composition-setup') { %>
|
|
27
27
|
legacy: false,<% } %>
|
|
@@ -23,7 +23,7 @@ module.exports = {
|
|
|
23
23
|
// Base ESLint recommended rules
|
|
24
24
|
// 'eslint:recommended',
|
|
25
25
|
|
|
26
|
-
// https://
|
|
26
|
+
// https://typescript-eslint.io/getting-started/legacy-eslint-setup
|
|
27
27
|
// ESLint typescript rules
|
|
28
28
|
'plugin:@typescript-eslint/recommended',
|
|
29
29
|
|
|
@@ -120,6 +120,11 @@ module.exports = {
|
|
|
120
120
|
// in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled
|
|
121
121
|
'@typescript-eslint/no-var-requires': 'off',
|
|
122
122
|
|
|
123
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
124
|
+
'error',
|
|
125
|
+
{ prefer: 'type-imports' },
|
|
126
|
+
],
|
|
127
|
+
|
|
123
128
|
// The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
|
|
124
129
|
// does not work with type definitions
|
|
125
130
|
'no-unused-vars': 'off',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineStore } from '#q-app/wrappers'
|
|
2
2
|
import { createPinia } from 'pinia'
|
|
3
|
-
import { Router } from 'vue-router';
|
|
3
|
+
import type { Router } from 'vue-router';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* When adding new properties to stores, you should also
|
|
@@ -22,7 +22,7 @@ declare module 'pinia' {
|
|
|
22
22
|
* with the Store instance.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
export default
|
|
25
|
+
export default defineStore((/* { ssrContext } */) => {
|
|
26
26
|
const pinia = createPinia()
|
|
27
27
|
|
|
28
28
|
// You can add Pinia plugins here
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
<% } %>
|
|
12
12
|
"test": "echo \"No test specified\" && exit 0",
|
|
13
13
|
"dev": "quasar dev",
|
|
14
|
-
"build": "quasar build"
|
|
14
|
+
"build": "quasar build",
|
|
15
|
+
"postinstall": "quasar prepare"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
18
|
<% if (preset.axios) { %>"axios": "^1.2.1",<% } %>
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
"prettier": "^3.0.3",
|
|
44
45
|
<% } } %>
|
|
45
46
|
"@types/node": "^20.5.9",
|
|
46
|
-
"@quasar/app-webpack": "^4.0.0-
|
|
47
|
+
"@quasar/app-webpack": "^4.0.0-rc.1",
|
|
47
48
|
"ts-loader": "^9.4.2",
|
|
48
49
|
"typescript": "^5.2.2"
|
|
49
50
|
},
|
|
@@ -1,14 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"baseUrl": "."
|
|
5
|
-
},
|
|
6
|
-
"exclude": [
|
|
7
|
-
"./dist",
|
|
8
|
-
"./.quasar",
|
|
9
|
-
"./node_modules",
|
|
10
|
-
"./src-capacitor",
|
|
11
|
-
"./src-cordova",
|
|
12
|
-
"./quasar.config.*.temporary.compiled*"
|
|
13
|
-
]
|
|
2
|
+
"extends": "./.quasar/tsconfig.json"
|
|
14
3
|
}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
/* eslint global-require: 0 */
|
|
11
11
|
<% } %>
|
|
12
12
|
<% } %>
|
|
13
|
-
import {
|
|
13
|
+
import { defineConfig } from '#q-app/wrappers';
|
|
14
14
|
|
|
15
|
-
export default
|
|
15
|
+
export default defineConfig((/* ctx */) => {
|
|
16
16
|
return {
|
|
17
17
|
<% if (preset.lint) { %>eslint: {
|
|
18
18
|
// fix: true,
|
|
@@ -71,6 +71,12 @@ export default configure((/* ctx */) => {
|
|
|
71
71
|
node: 'node20'
|
|
72
72
|
},
|
|
73
73
|
|
|
74
|
+
typescript: {
|
|
75
|
+
strict: true,
|
|
76
|
+
vueShim: true
|
|
77
|
+
// extendTsConfig (tsConfig) {}
|
|
78
|
+
},
|
|
79
|
+
|
|
74
80
|
// rtl: true, // https://quasar.dev/options/rtl-support
|
|
75
81
|
// preloadChunks: true,
|
|
76
82
|
// showProgress: false,
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
<% if (sfcStyle === 'composition-setup') { %>
|
|
5
5
|
<script setup lang="ts">
|
|
6
|
-
|
|
7
|
-
name: 'App'
|
|
8
|
-
});
|
|
6
|
+
//
|
|
9
7
|
</script><% } else if (sfcStyle === 'composition' || sfcStyle === 'options') { %>
|
|
10
8
|
<script lang="ts">
|
|
11
9
|
import { defineComponent } from 'vue';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<% if (sfcStyle === 'composition-setup') { %>
|
|
15
15
|
<script setup lang="ts">
|
|
16
16
|
import { computed, ref } from 'vue';
|
|
17
|
-
import { Todo, Meta } from './models';
|
|
17
|
+
import type { Todo, Meta } from './models';
|
|
18
18
|
|
|
19
19
|
interface Props {
|
|
20
20
|
title: string;
|
|
@@ -38,13 +38,13 @@ const todoCount = computed(() => props.todos.length);
|
|
|
38
38
|
<script lang="ts">
|
|
39
39
|
import {
|
|
40
40
|
defineComponent,
|
|
41
|
-
PropType,
|
|
42
41
|
computed,
|
|
43
42
|
ref,
|
|
44
43
|
toRef,
|
|
45
|
-
|
|
44
|
+
type PropType,
|
|
45
|
+
type Ref,
|
|
46
46
|
} from 'vue';
|
|
47
|
-
import { Todo, Meta } from './models';
|
|
47
|
+
import type { Todo, Meta } from './models';
|
|
48
48
|
|
|
49
49
|
function useClickCount() {
|
|
50
50
|
const clickCount = ref(0);
|
|
@@ -88,8 +88,8 @@ export default defineComponent({
|
|
|
88
88
|
});
|
|
89
89
|
</script><% } else if (sfcStyle === 'options') { %>
|
|
90
90
|
<script lang="ts">
|
|
91
|
-
import { defineComponent, PropType } from 'vue';
|
|
92
|
-
import { Todo, Meta } from './models';
|
|
91
|
+
import { defineComponent, type PropType } from 'vue';
|
|
92
|
+
import type { Todo, Meta } from './models';
|
|
93
93
|
|
|
94
94
|
export default defineComponent({
|
|
95
95
|
name: 'ExampleComponent',
|
|
@@ -47,11 +47,7 @@
|
|
|
47
47
|
<% if (sfcStyle === 'composition-setup') { %>
|
|
48
48
|
<script setup lang="ts">
|
|
49
49
|
import { ref } from 'vue';
|
|
50
|
-
import EssentialLink, { EssentialLinkProps } from 'components/EssentialLink.vue';
|
|
51
|
-
|
|
52
|
-
defineOptions({
|
|
53
|
-
name: 'MainLayout'
|
|
54
|
-
});
|
|
50
|
+
import EssentialLink, { type EssentialLinkProps } from 'components/EssentialLink.vue';
|
|
55
51
|
|
|
56
52
|
const linksList: EssentialLinkProps[] = [
|
|
57
53
|
{
|
|
@@ -106,7 +102,7 @@ function toggleLeftDrawer () {
|
|
|
106
102
|
</script><% } else if (sfcStyle === 'composition') { %>
|
|
107
103
|
<script lang="ts">
|
|
108
104
|
import { defineComponent, ref } from 'vue';
|
|
109
|
-
import EssentialLink, { EssentialLinkProps } from 'components/EssentialLink.vue';
|
|
105
|
+
import EssentialLink, { type EssentialLinkProps } from 'components/EssentialLink.vue';
|
|
110
106
|
|
|
111
107
|
const linksList: EssentialLinkProps[] = [
|
|
112
108
|
{
|
|
@@ -175,7 +171,7 @@ export default defineComponent({
|
|
|
175
171
|
</script><% } else if (sfcStyle === 'options') { %>
|
|
176
172
|
<script lang="ts">
|
|
177
173
|
import { defineComponent } from 'vue';
|
|
178
|
-
import EssentialLink, { EssentialLinkProps } from 'components/EssentialLink.vue';
|
|
174
|
+
import EssentialLink, { type EssentialLinkProps } from 'components/EssentialLink.vue';
|
|
179
175
|
|
|
180
176
|
const linksList: EssentialLinkProps[] = [
|
|
181
177
|
{
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
<% if (sfcStyle === 'composition-setup') { %>
|
|
25
25
|
<script setup lang="ts">
|
|
26
|
-
|
|
27
|
-
name: 'ErrorNotFound'
|
|
28
|
-
});
|
|
26
|
+
//
|
|
29
27
|
</script><% } else if (sfcStyle === 'composition' || sfcStyle === 'options') { %>
|
|
30
28
|
<script lang="ts">
|
|
31
29
|
import { defineComponent } from 'vue';
|
|
@@ -11,13 +11,9 @@
|
|
|
11
11
|
<% if (sfcStyle === 'composition-setup') { %>
|
|
12
12
|
<script setup lang="ts">
|
|
13
13
|
import { ref } from 'vue';
|
|
14
|
-
import { Todo, Meta } from 'components/models';
|
|
14
|
+
import type { Todo, Meta } from 'components/models';
|
|
15
15
|
import ExampleComponent from 'components/ExampleComponent.vue';
|
|
16
16
|
|
|
17
|
-
defineOptions({
|
|
18
|
-
name: 'IndexPage'
|
|
19
|
-
});
|
|
20
|
-
|
|
21
17
|
const todos = ref<Todo[]>([
|
|
22
18
|
{
|
|
23
19
|
id: 1,
|
|
@@ -47,7 +43,7 @@ const meta = ref<Meta>({
|
|
|
47
43
|
</script><% } else if (sfcStyle === 'composition') { %>
|
|
48
44
|
<script lang="ts">
|
|
49
45
|
import { defineComponent, ref } from 'vue';
|
|
50
|
-
import { Todo, Meta } from 'components/models';
|
|
46
|
+
import type { Todo, Meta } from 'components/models';
|
|
51
47
|
import ExampleComponent from 'components/ExampleComponent.vue';
|
|
52
48
|
|
|
53
49
|
export default defineComponent({
|
|
@@ -91,7 +87,7 @@ export default defineComponent({
|
|
|
91
87
|
</script><% } else if (sfcStyle === 'options') { %>
|
|
92
88
|
<script lang="ts">
|
|
93
89
|
import { defineComponent } from 'vue';
|
|
94
|
-
import { Todo, Meta } from 'components/models';
|
|
90
|
+
import type { Todo, Meta } from 'components/models';
|
|
95
91
|
import ExampleComponent from 'components/ExampleComponent.vue';
|
|
96
92
|
|
|
97
93
|
export default defineComponent({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineRouter } from '#q-app/wrappers';
|
|
2
2
|
import {
|
|
3
3
|
createMemoryHistory,
|
|
4
4
|
createRouter,
|
|
@@ -16,7 +16,7 @@ import routes from './routes';
|
|
|
16
16
|
* with the Router instance.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
export default
|
|
19
|
+
export default defineRouter(function (/* { store, ssrContext } */) {
|
|
20
20
|
const createHistory = process.env.SERVER
|
|
21
21
|
? createMemoryHistory
|
|
22
22
|
: (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import axios, { AxiosInstance } from 'axios';
|
|
1
|
+
import { defineBoot } from '#q-app/wrappers';
|
|
2
|
+
import axios, { type AxiosInstance } from 'axios';
|
|
3
3
|
|
|
4
4
|
declare module 'vue' {
|
|
5
5
|
interface ComponentCustomProperties {
|
|
@@ -16,7 +16,7 @@ declare module 'vue' {
|
|
|
16
16
|
// for each client)
|
|
17
17
|
const api = axios.create({ baseURL: 'https://api.example.com' });
|
|
18
18
|
|
|
19
|
-
export default
|
|
19
|
+
export default defineBoot(({ app }) => {
|
|
20
20
|
// for use inside Vue files (Options API) through this.$axios and this.$api
|
|
21
21
|
|
|
22
22
|
app.config.globalProperties.$axios = axios;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineBoot } from '#q-app/wrappers';
|
|
2
2
|
import { createI18n } from 'vue-i18n';
|
|
3
3
|
|
|
4
4
|
import messages from 'src/i18n';
|
|
@@ -21,7 +21,7 @@ declare module "vue-i18n" {
|
|
|
21
21
|
}
|
|
22
22
|
/* eslint-enable @typescript-eslint/no-empty-interface */
|
|
23
23
|
|
|
24
|
-
export default
|
|
24
|
+
export default defineBoot(({ app }) => {
|
|
25
25
|
const i18n = createI18n<{ message: MessageSchema }, MessageLanguages>({
|
|
26
26
|
locale: 'en-US',<% if (sfcStyle === 'composition' || sfcStyle === 'composition-setup') { %>
|
|
27
27
|
legacy: false,<% } %>
|
|
@@ -24,7 +24,7 @@ module.exports = {
|
|
|
24
24
|
// Base ESLint recommended rules
|
|
25
25
|
// 'eslint:recommended',
|
|
26
26
|
|
|
27
|
-
// https://
|
|
27
|
+
// https://typescript-eslint.io/getting-started/legacy-eslint-setup
|
|
28
28
|
// ESLint typescript rules
|
|
29
29
|
'plugin:@typescript-eslint/recommended',
|
|
30
30
|
|
|
@@ -124,6 +124,11 @@ module.exports = {
|
|
|
124
124
|
// in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled
|
|
125
125
|
'@typescript-eslint/no-var-requires': 'off',
|
|
126
126
|
|
|
127
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
128
|
+
'error',
|
|
129
|
+
{ prefer: 'type-imports' },
|
|
130
|
+
],
|
|
131
|
+
|
|
127
132
|
// The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
|
|
128
133
|
// does not work with type definitions
|
|
129
134
|
'no-unused-vars': 'off',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineStore } from '#q-app/wrappers'
|
|
2
2
|
import { createPinia } from 'pinia'
|
|
3
|
-
import { Router } from 'vue-router';
|
|
3
|
+
import type { Router } from 'vue-router';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* When adding new properties to stores, you should also
|
|
@@ -22,7 +22,7 @@ declare module 'pinia' {
|
|
|
22
22
|
* with the Store instance.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
export default
|
|
25
|
+
export default defineStore((/* { ssrContext } */) => {
|
|
26
26
|
const pinia = createPinia()
|
|
27
27
|
|
|
28
28
|
// You can add Pinia plugins here
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
settings: {
|
|
3
|
+
'lodash-template/globals': [
|
|
4
|
+
// Base
|
|
5
|
+
'name',
|
|
6
|
+
'description',
|
|
7
|
+
'author',
|
|
8
|
+
|
|
9
|
+
'preset',
|
|
10
|
+
'orgName',
|
|
11
|
+
'pkgName',
|
|
12
|
+
'license',
|
|
13
|
+
'repositoryType',
|
|
14
|
+
'repositoryURL',
|
|
15
|
+
'homepage',
|
|
16
|
+
'bugs',
|
|
17
|
+
|
|
18
|
+
'packageManagerField',
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<img src="https://img.shields.io/npm/v/<%= pkgName %>.svg?label=<%= pkgName %>">
|
|
2
|
+
|
|
3
|
+
Compatible with:
|
|
4
|
+
|
|
5
|
+
- Quasar UI v2 and Vue 3
|
|
6
|
+
- Quasar CLI with Vite v1.5+ and v2
|
|
7
|
+
- Quasar CLI with Webpack v3.10+ and v4
|
|
8
|
+
|
|
9
|
+
# Structure
|
|
10
|
+
|
|
11
|
+
- [/app-extension](app-extension) - App Extension for Quasar CLI
|
|
12
|
+
- [/playground](playground) - collection of playground apps to test the UI and App Extension
|
|
13
|
+
|
|
14
|
+
# Development
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
$ <%= packageManager?.name ?? 'pnpm' %> i # install the dependencies
|
|
18
|
+
|
|
19
|
+
$ <%= packageManager?.name ?? 'pnpm' %> build # build the app-extension. Run this after making any change in ./app-extension
|
|
20
|
+
|
|
21
|
+
$ <%= packageManager?.name ?? 'pnpm' %> dev:vite # start the app-vite playground
|
|
22
|
+
$ <%= packageManager?.name ?? 'pnpm' %> dev:webpack # start the app-webpack playground
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
For more development-related explanation, see:
|
|
26
|
+
- [`app-extension/src/runtime/README.md`](app-extension/src/runtime/README.md)
|
|
27
|
+
<% if (preset.install) { %>- [`app-extension/src/templates/README.md`](app-extension/src/templates/README.md)<% } %>
|
|
28
|
+
|
|
29
|
+
# Donate
|
|
30
|
+
|
|
31
|
+
If you appreciate the work that went into this project, please consider [donating to Quasar](https://donate.quasar.dev).
|
|
32
|
+
|
|
33
|
+
# License
|
|
34
|
+
|
|
35
|
+
<%= license %> (c) <%= author %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"editor.bracketPairColorization.enabled": true,
|
|
3
|
+
"editor.guides.bracketPairs": true,
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
6
|
+
"editor.codeActionsOnSave": {
|
|
7
|
+
"source.fixAll.eslint": "explicit"
|
|
8
|
+
},
|
|
9
|
+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
|
|
10
|
+
"eslint.workingDirectories": ["./app-extension", "./ui", "./playground/*"],
|
|
11
|
+
"typescript.tsdk": "node_modules/typescript/lib"
|
|
12
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import tseslint from 'typescript-eslint';
|
|
3
|
+
import pluginVue from 'eslint-plugin-vue';
|
|
4
|
+
import configPrettier from 'eslint-config-prettier';
|
|
5
|
+
import globals from 'globals';
|
|
6
|
+
import { version as vueVersion } from 'vue';
|
|
7
|
+
|
|
8
|
+
export default tseslint.config(
|
|
9
|
+
{
|
|
10
|
+
name: 'eslint/recommended',
|
|
11
|
+
...eslint.configs.recommended,
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
// Recommended rules
|
|
15
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
16
|
+
// Strict rules (recommended if have good TS knowledge)
|
|
17
|
+
// ...tseslint.configs.strictTypeChecked, // disable recommended above if you enable this
|
|
18
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
19
|
+
|
|
20
|
+
...pluginVue.configs['flat/recommended'],
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
name: 'eslint-config-prettier',
|
|
24
|
+
...configPrettier,
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
{
|
|
28
|
+
name: 'ignored',
|
|
29
|
+
|
|
30
|
+
ignores: [
|
|
31
|
+
"**/dist",
|
|
32
|
+
|
|
33
|
+
"playground/*/.quasar",
|
|
34
|
+
"playground/*/quasar.config.*.temporary.compiled*",
|
|
35
|
+
"playground/*/src-cordova",
|
|
36
|
+
"playground/*/src-capacitor",
|
|
37
|
+
"playground/*/src-ssr",
|
|
38
|
+
"playground/*/postcss.config.cjs",
|
|
39
|
+
|
|
40
|
+
"playground/quasar-cli-webpack/src-bex/www",
|
|
41
|
+
"playground/quasar-cli-webpack/babel.config.cjs",
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
{
|
|
46
|
+
name: 'general',
|
|
47
|
+
|
|
48
|
+
languageOptions: {
|
|
49
|
+
parserOptions: {
|
|
50
|
+
parser: tseslint.parser,
|
|
51
|
+
extraFileExtensions: ['.vue'],
|
|
52
|
+
projectService: true,
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
globals: {
|
|
56
|
+
...globals.browser,
|
|
57
|
+
...globals.node,
|
|
58
|
+
...globals.es2021,
|
|
59
|
+
|
|
60
|
+
chrome: 'readonly',
|
|
61
|
+
cordova: 'readonly',
|
|
62
|
+
Capacitor: 'readonly',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
rules: {
|
|
67
|
+
'@typescript-eslint/no-misused-promises': [
|
|
68
|
+
'error',
|
|
69
|
+
{ checksVoidReturn: false },
|
|
70
|
+
],
|
|
71
|
+
'@typescript-eslint/no-unused-vars': [
|
|
72
|
+
'error',
|
|
73
|
+
{ argsIgnorePattern: '^_' },
|
|
74
|
+
],
|
|
75
|
+
|
|
76
|
+
'vue/no-unsupported-features': [
|
|
77
|
+
'error',
|
|
78
|
+
{
|
|
79
|
+
version: vueVersion,
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
'vue/padding-line-between-blocks': 'warn',
|
|
83
|
+
'vue/no-empty-component-block': 'warn',
|
|
84
|
+
'vue/eqeqeq': 'error',
|
|
85
|
+
'vue/custom-event-name-casing': 'warn',
|
|
86
|
+
'vue/no-unused-properties': ['warn', { groups: ['props', 'setup'] }],
|
|
87
|
+
'vue/v-for-delimiter-style': 'warn',
|
|
88
|
+
'vue/require-macro-variable-name': 'warn',
|
|
89
|
+
'vue/prefer-separate-static-class': 'warn',
|
|
90
|
+
|
|
91
|
+
curly: 'error',
|
|
92
|
+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
{
|
|
97
|
+
// Layout/page components are not used as components in templates, so they don't need to be multi-word
|
|
98
|
+
name: 'playground/vue-layout-and-page',
|
|
99
|
+
files: [
|
|
100
|
+
'playground/*/src/layouts/**/*.vue',
|
|
101
|
+
'playground/*/src/pages/**/*.vue',
|
|
102
|
+
],
|
|
103
|
+
rules: {
|
|
104
|
+
'vue/multi-word-component-names': 'off',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
);
|