create-quasar 2.1.0 → 2.2.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.
- package/index.js +72 -54
- package/package.json +14 -18
- package/scripts/create-test-project.ts +26 -25
- package/templates/{eslint.config.base.js → __eslint.config.base.js} +3 -2
- package/templates/app/{eslint.config.js → __eslint.config.js} +2 -3
- package/templates/app/create-quasar-script.js +8 -0
- package/templates/app/quasar-v2/create-quasar-script.js +39 -0
- package/templates/app/quasar-v2/js-vite-2/BASE/README.md +4 -4
- package/templates/app/quasar-v2/js-vite-2/BASE/_.vscode/extensions.json +2 -2
- package/templates/app/quasar-v2/js-vite-2/BASE/_.vscode/settings.json +2 -2
- package/templates/app/quasar-v2/js-vite-2/BASE/_package.json +13 -14
- package/templates/app/quasar-v2/js-vite-2/BASE/index.html +3 -3
- package/templates/app/quasar-v2/js-vite-2/BASE/quasar.config.js +9 -10
- package/templates/app/quasar-v2/js-vite-2/BASE/src/App.vue +0 -11
- package/templates/app/quasar-v2/js-vite-2/BASE/src/components/EssentialLink.vue +7 -35
- package/templates/app/quasar-v2/js-vite-2/BASE/src/layouts/MainLayout.vue +2 -141
- package/templates/app/quasar-v2/js-vite-2/BASE/src/pages/ErrorNotFound.vue +0 -11
- package/templates/app/quasar-v2/js-vite-2/BASE/src/pages/IndexPage.vue +0 -11
- package/templates/app/quasar-v2/{ts-webpack-4/index.js → js-vite-2/create-quasar-script.js} +24 -7
- package/templates/app/quasar-v2/js-vite-2/eslint/_eslint.config.js +3 -3
- package/templates/app/quasar-v2/js-webpack-4/BASE/README.md +4 -4
- package/templates/app/quasar-v2/js-webpack-4/BASE/_.vscode/extensions.json +2 -2
- package/templates/app/quasar-v2/js-webpack-4/BASE/_.vscode/settings.json +2 -2
- package/templates/app/quasar-v2/js-webpack-4/BASE/_package.json +10 -11
- package/templates/app/quasar-v2/js-webpack-4/BASE/index.html +3 -3
- package/templates/app/quasar-v2/js-webpack-4/BASE/quasar.config.js +5 -6
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/App.vue +0 -11
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/components/EssentialLink.vue +7 -35
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/layouts/MainLayout.vue +2 -141
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/pages/ErrorNotFound.vue +0 -11
- package/templates/app/quasar-v2/js-webpack-4/BASE/src/pages/IndexPage.vue +0 -11
- package/templates/app/quasar-v2/{js-vite-2/index.js → js-webpack-4/create-quasar-script.js} +24 -7
- package/templates/app/quasar-v2/js-webpack-4/eslint/_eslint.config.js +3 -3
- package/templates/app/quasar-v2/ts-vite-2/BASE/README.md +4 -4
- package/templates/app/quasar-v2/ts-vite-2/BASE/_.vscode/extensions.json +2 -2
- package/templates/app/quasar-v2/ts-vite-2/BASE/_.vscode/settings.json +2 -2
- package/templates/app/quasar-v2/ts-vite-2/BASE/_package.json +13 -14
- package/templates/app/quasar-v2/ts-vite-2/BASE/index.html +3 -3
- package/templates/app/quasar-v2/ts-vite-2/BASE/quasar.config.ts +9 -10
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/App.vue +0 -11
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/components/EssentialLink.vue +2 -37
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/components/ExampleComponent.vue +2 -98
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/layouts/MainLayout.vue +2 -141
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/pages/ErrorNotFound.vue +0 -11
- package/templates/app/quasar-v2/ts-vite-2/BASE/src/pages/IndexPage.vue +2 -90
- package/templates/app/quasar-v2/{ts-webpack-4/.eslintrc.cjs → ts-vite-2/__.eslintrc.cjs} +0 -1
- package/templates/app/quasar-v2/ts-vite-2/{index.js → create-quasar-script.js} +24 -7
- package/templates/app/quasar-v2/ts-vite-2/eslint/_eslint.config.js +3 -3
- package/templates/app/quasar-v2/ts-vite-2/i18n/src/boot/i18n.ts +2 -2
- package/templates/app/quasar-v2/ts-webpack-4/BASE/README.md +4 -4
- package/templates/app/quasar-v2/ts-webpack-4/BASE/_.vscode/extensions.json +2 -2
- package/templates/app/quasar-v2/ts-webpack-4/BASE/_.vscode/settings.json +2 -2
- package/templates/app/quasar-v2/ts-webpack-4/BASE/_package.json +10 -11
- package/templates/app/quasar-v2/ts-webpack-4/BASE/index.html +3 -3
- package/templates/app/quasar-v2/ts-webpack-4/BASE/quasar.config.ts +5 -6
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/App.vue +0 -11
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/components/EssentialLink.vue +2 -37
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/components/ExampleComponent.vue +2 -98
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/layouts/MainLayout.vue +2 -141
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/pages/ErrorNotFound.vue +0 -11
- package/templates/app/quasar-v2/ts-webpack-4/BASE/src/pages/IndexPage.vue +2 -90
- package/templates/app/quasar-v2/{ts-vite-2/.eslintrc.cjs → ts-webpack-4/__.eslintrc.cjs} +0 -1
- package/templates/app/quasar-v2/{js-webpack-4/index.js → ts-webpack-4/create-quasar-script.js} +24 -7
- package/templates/app/quasar-v2/ts-webpack-4/eslint/_eslint.config.js +3 -3
- package/templates/app/quasar-v2/ts-webpack-4/i18n/src/boot/i18n.ts +2 -2
- package/templates/app-extension/{eslint.config.js → __eslint.config.js} +3 -5
- package/templates/app-extension/ae-js/BASE/README.md +5 -5
- package/templates/app-extension/ae-js/BASE/_package.json +6 -6
- package/templates/app-extension/ae-js/BASE/src/index.js +1 -1
- package/templates/app-extension/ae-js/{index.js → create-quasar-script.js} +4 -14
- package/templates/app-extension/ae-js/install-script/src/install.js +1 -1
- package/templates/app-extension/ae-js/prompts-script/src/prompts.js +1 -1
- package/templates/app-extension/ae-js/uninstall-script/src/uninstall.js +1 -1
- package/templates/app-extension/ae-ts/BASE/README.md +6 -6
- package/templates/app-extension/ae-ts/BASE/_eslint.config.js +3 -2
- package/templates/app-extension/ae-ts/BASE/_package.json +11 -11
- package/templates/app-extension/ae-ts/BASE/app-extension/README.md +7 -7
- package/templates/app-extension/ae-ts/BASE/app-extension/_package.json +9 -9
- package/templates/app-extension/ae-ts/BASE/app-extension/src/index.ts +2 -2
- package/templates/app-extension/ae-ts/BASE/app-extension/src/runtime/README.md +3 -3
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/README.md +11 -11
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/_package.json +4 -4
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/index.html +3 -3
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/quasar.config.ts +0 -2
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/quasar.extensions.json +1 -1
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/quasar.d.ts +1 -1
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/README.md +10 -10
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/_package.json +4 -4
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/index.html +3 -3
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/quasar.config.ts +0 -2
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/quasar.extensions.json +1 -1
- package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/quasar.d.ts +1 -1
- package/templates/app-extension/ae-ts/{index.js → create-quasar-script.js} +11 -6
- package/templates/app-extension/create-quasar-script.js +17 -0
- package/templates/ui-kit/{eslint.config.js → __eslint.config.js} +2 -2
- package/templates/ui-kit/{index.js → create-quasar-script.js} +8 -5
- package/templates/ui-kit/quasar-v2/BASE/LICENSE +1 -1
- package/templates/ui-kit/quasar-v2/BASE/README.md +4 -4
- package/templates/ui-kit/quasar-v2/BASE/ui/README.md +29 -29
- package/templates/ui-kit/quasar-v2/BASE/ui/_package.json +4 -4
- package/templates/ui-kit/quasar-v2/BASE/ui/build/index.js +1 -1
- package/templates/ui-kit/quasar-v2/BASE/ui/build/script.javascript.js +2 -2
- package/templates/ui-kit/quasar-v2/BASE/ui/dev/src/index.template.html +10 -5
- package/templates/ui-kit/quasar-v2/BASE/ui/dev/src/layouts/MyLayout.vue +1 -1
- package/templates/ui-kit/quasar-v2/BASE/ui/dev/src/pages/Test1.vue +4 -4
- package/templates/ui-kit/quasar-v2/BASE/ui/src/index.sass +2 -2
- package/templates/ui-kit/quasar-v2/BASE/ui/src/vue-plugin.js +6 -6
- package/templates/ui-kit/quasar-v2/BASE/ui/umd-test.html +2 -2
- package/templates/ui-kit/quasar-v2/ae/app-extension/README.md +6 -6
- package/templates/ui-kit/quasar-v2/ae/app-extension/_package.json +5 -5
- package/templates/ui-kit/quasar-v2/ae/app-extension/src/boot/register.js +1 -1
- package/templates/ui-kit/quasar-v2/ae/app-extension/src/index.js +7 -7
- package/templates/ui-kit/quasar-v2/{index.js → create-quasar-script.js} +5 -2
- package/templates/ui-kit/quasar-v2/ui-component/ui/src/components/Component.js +3 -3
- package/templates/ui-kit/quasar-v2/ui-component/ui/src/components/Component.sass +1 -1
- package/templates/ui-kit/quasar-v2/ui-directive/ui/src/directives/Directive.js +1 -1
- package/templates/ui-kit/quasar-v2/ui-directive/ui/src/directives/Directive.sass +1 -1
- package/utils/index.js +106 -93
- package/utils/logger.js +52 -50
- package/utils/template.js +280 -0
- package/eslint.config.base.js +0 -19
- package/eslint.config.js +0 -47
- package/templates/app/index.js +0 -8
- package/templates/app/quasar-v2/index.js +0 -56
- package/templates/app/quasar-v2/js-vite-2/axios/src/boot/axios.js +0 -24
- package/templates/app/quasar-v2/js-vite-2/scss/src/css/app.scss +0 -1
- package/templates/app/quasar-v2/js-vite-2/scss/src/css/quasar.variables.scss +0 -25
- package/templates/app/quasar-v2/js-webpack-4/axios/src/boot/axios.js +0 -24
- package/templates/app/quasar-v2/js-webpack-4/scss/src/css/app.scss +0 -1
- package/templates/app/quasar-v2/js-webpack-4/scss/src/css/quasar.variables.scss +0 -25
- package/templates/app/quasar-v2/ts-vite-2/axios/src/boot/axios.ts +0 -31
- package/templates/app/quasar-v2/ts-vite-2/scss/src/css/app.scss +0 -1
- package/templates/app/quasar-v2/ts-vite-2/scss/src/css/quasar.variables.scss +0 -25
- package/templates/app/quasar-v2/ts-webpack-4/axios/src/boot/axios.ts +0 -31
- package/templates/app/quasar-v2/ts-webpack-4/scss/src/css/app.scss +0 -1
- package/templates/app/quasar-v2/ts-webpack-4/scss/src/css/quasar.variables.scss +0 -25
- package/templates/app-extension/index.js +0 -15
- /package/templates/app/quasar-v2/js-vite-2/{.eslintrc.cjs → __.eslintrc.cjs} +0 -0
- /package/templates/app/quasar-v2/js-webpack-4/{.eslintrc.cjs → __.eslintrc.cjs} +0 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<p>Clicks on todos: {{ clickCount }}</p>
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
<script setup lang="ts">
|
|
16
16
|
import { computed, ref } from 'vue';
|
|
17
17
|
import type { Todo, Meta } from './models';
|
|
@@ -34,100 +34,4 @@ function increment() {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
const todoCount = computed(() => props.todos.length);
|
|
37
|
-
</script
|
|
38
|
-
<script lang="ts">
|
|
39
|
-
import {
|
|
40
|
-
defineComponent,
|
|
41
|
-
computed,
|
|
42
|
-
ref,
|
|
43
|
-
toRef,
|
|
44
|
-
type PropType,
|
|
45
|
-
type Ref,
|
|
46
|
-
} from 'vue';
|
|
47
|
-
import type { Todo, Meta } from './models';
|
|
48
|
-
|
|
49
|
-
function useClickCount() {
|
|
50
|
-
const clickCount = ref(0);
|
|
51
|
-
function increment() {
|
|
52
|
-
clickCount.value += 1
|
|
53
|
-
return clickCount.value;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return { clickCount, increment };
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function useDisplayTodo(todos: Ref<Todo[]>) {
|
|
60
|
-
const todoCount = computed(() => todos.value.length);
|
|
61
|
-
return { todoCount };
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export default defineComponent({
|
|
65
|
-
name: 'ExampleComponent',
|
|
66
|
-
|
|
67
|
-
props: {
|
|
68
|
-
title: {
|
|
69
|
-
type: String,
|
|
70
|
-
required: true
|
|
71
|
-
},
|
|
72
|
-
todos: {
|
|
73
|
-
type: Array as PropType<Todo[]>,
|
|
74
|
-
default: () => []
|
|
75
|
-
},
|
|
76
|
-
meta: {
|
|
77
|
-
type: Object as PropType<Meta>,
|
|
78
|
-
required: true
|
|
79
|
-
},
|
|
80
|
-
active: {
|
|
81
|
-
type: Boolean
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
setup (props) {
|
|
86
|
-
return { ...useClickCount(), ...useDisplayTodo(toRef(props, 'todos')) };
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
</script><% } else if (sfcStyle === 'options') { %>
|
|
90
|
-
<script lang="ts">
|
|
91
|
-
import { defineComponent, type PropType } from 'vue';
|
|
92
|
-
import type { Todo, Meta } from './models';
|
|
93
|
-
|
|
94
|
-
export default defineComponent({
|
|
95
|
-
name: 'ExampleComponent',
|
|
96
|
-
|
|
97
|
-
props: {
|
|
98
|
-
title: {
|
|
99
|
-
type: String,
|
|
100
|
-
required: true
|
|
101
|
-
},
|
|
102
|
-
todos: {
|
|
103
|
-
type: Array as PropType<Todo[]>,
|
|
104
|
-
default: () => [] as Todo[]
|
|
105
|
-
},
|
|
106
|
-
meta: {
|
|
107
|
-
type: Object as PropType<Meta>,
|
|
108
|
-
required: true
|
|
109
|
-
},
|
|
110
|
-
active: {
|
|
111
|
-
type: Boolean
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
data(): { clickCount: number } {
|
|
116
|
-
return {
|
|
117
|
-
clickCount: 0
|
|
118
|
-
};
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
methods: {
|
|
122
|
-
increment (): void {
|
|
123
|
-
this.clickCount += 1;
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
computed: {
|
|
128
|
-
todoCount (): number {
|
|
129
|
-
return this.todos.length;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
</script><% } %>
|
|
37
|
+
</script>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</q-page-container>
|
|
45
45
|
</q-layout>
|
|
46
46
|
</template>
|
|
47
|
-
|
|
47
|
+
|
|
48
48
|
<script setup lang="ts">
|
|
49
49
|
import { ref } from 'vue';
|
|
50
50
|
import EssentialLink, { type EssentialLinkProps } from 'components/EssentialLink.vue';
|
|
@@ -99,143 +99,4 @@ const leftDrawerOpen = ref(false);
|
|
|
99
99
|
function toggleLeftDrawer () {
|
|
100
100
|
leftDrawerOpen.value = !leftDrawerOpen.value;
|
|
101
101
|
}
|
|
102
|
-
</script
|
|
103
|
-
<script lang="ts">
|
|
104
|
-
import { defineComponent, ref } from 'vue';
|
|
105
|
-
import EssentialLink, { type EssentialLinkProps } from 'components/EssentialLink.vue';
|
|
106
|
-
|
|
107
|
-
const linksList: EssentialLinkProps[] = [
|
|
108
|
-
{
|
|
109
|
-
title: 'Docs',
|
|
110
|
-
caption: 'quasar.dev',
|
|
111
|
-
icon: 'school',
|
|
112
|
-
link: 'https://quasar.dev'
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
title: 'Github',
|
|
116
|
-
caption: 'github.com/quasarframework',
|
|
117
|
-
icon: 'code',
|
|
118
|
-
link: 'https://github.com/quasarframework'
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
title: 'Discord Chat Channel',
|
|
122
|
-
caption: 'chat.quasar.dev',
|
|
123
|
-
icon: 'chat',
|
|
124
|
-
link: 'https://chat.quasar.dev'
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
title: 'Forum',
|
|
128
|
-
caption: 'forum.quasar.dev',
|
|
129
|
-
icon: 'record_voice_over',
|
|
130
|
-
link: 'https://forum.quasar.dev'
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
title: 'Twitter',
|
|
134
|
-
caption: '@quasarframework',
|
|
135
|
-
icon: 'rss_feed',
|
|
136
|
-
link: 'https://twitter.quasar.dev'
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
title: 'Facebook',
|
|
140
|
-
caption: '@QuasarFramework',
|
|
141
|
-
icon: 'public',
|
|
142
|
-
link: 'https://facebook.quasar.dev'
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
title: 'Quasar Awesome',
|
|
146
|
-
caption: 'Community Quasar projects',
|
|
147
|
-
icon: 'favorite',
|
|
148
|
-
link: 'https://awesome.quasar.dev'
|
|
149
|
-
}
|
|
150
|
-
];
|
|
151
|
-
|
|
152
|
-
export default defineComponent({
|
|
153
|
-
name: 'MainLayout',
|
|
154
|
-
|
|
155
|
-
components: {
|
|
156
|
-
EssentialLink
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
setup () {
|
|
160
|
-
const leftDrawerOpen = ref(false);
|
|
161
|
-
|
|
162
|
-
return {
|
|
163
|
-
linksList,
|
|
164
|
-
leftDrawerOpen,
|
|
165
|
-
toggleLeftDrawer () {
|
|
166
|
-
leftDrawerOpen.value = !leftDrawerOpen.value;
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
</script><% } else if (sfcStyle === 'options') { %>
|
|
172
|
-
<script lang="ts">
|
|
173
|
-
import { defineComponent } from 'vue';
|
|
174
|
-
import EssentialLink, { type EssentialLinkProps } from 'components/EssentialLink.vue';
|
|
175
|
-
|
|
176
|
-
const linksList: EssentialLinkProps[] = [
|
|
177
|
-
{
|
|
178
|
-
title: 'Docs',
|
|
179
|
-
caption: 'quasar.dev',
|
|
180
|
-
icon: 'school',
|
|
181
|
-
link: 'https://quasar.dev'
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
title: 'Github',
|
|
185
|
-
caption: 'github.com/quasarframework',
|
|
186
|
-
icon: 'code',
|
|
187
|
-
link: 'https://github.com/quasarframework'
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
title: 'Discord Chat Channel',
|
|
191
|
-
caption: 'chat.quasar.dev',
|
|
192
|
-
icon: 'chat',
|
|
193
|
-
link: 'https://chat.quasar.dev'
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
title: 'Forum',
|
|
197
|
-
caption: 'forum.quasar.dev',
|
|
198
|
-
icon: 'record_voice_over',
|
|
199
|
-
link: 'https://forum.quasar.dev'
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
title: 'Twitter',
|
|
203
|
-
caption: '@quasarframework',
|
|
204
|
-
icon: 'rss_feed',
|
|
205
|
-
link: 'https://twitter.quasar.dev'
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
title: 'Facebook',
|
|
209
|
-
caption: '@QuasarFramework',
|
|
210
|
-
icon: 'public',
|
|
211
|
-
link: 'https://facebook.quasar.dev'
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
title: 'Quasar Awesome',
|
|
215
|
-
caption: 'Community Quasar projects',
|
|
216
|
-
icon: 'favorite',
|
|
217
|
-
link: 'https://awesome.quasar.dev'
|
|
218
|
-
}
|
|
219
|
-
];
|
|
220
|
-
|
|
221
|
-
export default defineComponent({
|
|
222
|
-
name: 'MainLayout',
|
|
223
|
-
|
|
224
|
-
components: {
|
|
225
|
-
EssentialLink
|
|
226
|
-
},
|
|
227
|
-
|
|
228
|
-
data () {
|
|
229
|
-
return {
|
|
230
|
-
linksList,
|
|
231
|
-
leftDrawerOpen: false
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
|
|
235
|
-
methods: {
|
|
236
|
-
toggleLeftDrawer () {
|
|
237
|
-
this.leftDrawerOpen = !this.leftDrawerOpen;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
</script><% } %>
|
|
102
|
+
</script>
|
|
@@ -21,14 +21,3 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
</template>
|
|
24
|
-
<% if (sfcStyle === 'composition-setup') { %>
|
|
25
|
-
<script setup lang="ts">
|
|
26
|
-
//
|
|
27
|
-
</script><% } else if (sfcStyle === 'composition' || sfcStyle === 'options') { %>
|
|
28
|
-
<script lang="ts">
|
|
29
|
-
import { defineComponent } from 'vue';
|
|
30
|
-
|
|
31
|
-
export default defineComponent({
|
|
32
|
-
name: 'ErrorNotFound'
|
|
33
|
-
});
|
|
34
|
-
</script><% } %>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
></example-component>
|
|
9
9
|
</q-page>
|
|
10
10
|
</template>
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
<script setup lang="ts">
|
|
13
13
|
import { ref } from 'vue';
|
|
14
14
|
import type { Todo, Meta } from 'components/models';
|
|
@@ -40,92 +40,4 @@ const todos = ref<Todo[]>([
|
|
|
40
40
|
const meta = ref<Meta>({
|
|
41
41
|
totalCount: 1200
|
|
42
42
|
});
|
|
43
|
-
</script
|
|
44
|
-
<script lang="ts">
|
|
45
|
-
import { defineComponent, ref } from 'vue';
|
|
46
|
-
import type { Todo, Meta } from 'components/models';
|
|
47
|
-
import ExampleComponent from 'components/ExampleComponent.vue';
|
|
48
|
-
|
|
49
|
-
export default defineComponent({
|
|
50
|
-
name: 'IndexPage',
|
|
51
|
-
|
|
52
|
-
components: {
|
|
53
|
-
ExampleComponent
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
setup () {
|
|
57
|
-
const todos = ref<Todo[]>([
|
|
58
|
-
{
|
|
59
|
-
id: 1,
|
|
60
|
-
content: 'ct1'
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
id: 2,
|
|
64
|
-
content: 'ct2'
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: 3,
|
|
68
|
-
content: 'ct3'
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: 4,
|
|
72
|
-
content: 'ct4'
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: 5,
|
|
76
|
-
content: 'ct5'
|
|
77
|
-
}
|
|
78
|
-
]);
|
|
79
|
-
|
|
80
|
-
const meta = ref<Meta>({
|
|
81
|
-
totalCount: 1200
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
return { todos, meta };
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
</script><% } else if (sfcStyle === 'options') { %>
|
|
88
|
-
<script lang="ts">
|
|
89
|
-
import { defineComponent } from 'vue';
|
|
90
|
-
import type { Todo, Meta } from 'components/models';
|
|
91
|
-
import ExampleComponent from 'components/ExampleComponent.vue';
|
|
92
|
-
|
|
93
|
-
export default defineComponent({
|
|
94
|
-
name: 'IndexPage',
|
|
95
|
-
|
|
96
|
-
components: {
|
|
97
|
-
ExampleComponent
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
data () {
|
|
101
|
-
const todos: Todo[] = [
|
|
102
|
-
{
|
|
103
|
-
id: 1,
|
|
104
|
-
content: 'ct1'
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
id: 2,
|
|
108
|
-
content: 'ct2'
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
id: 3,
|
|
112
|
-
content: 'ct3'
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
id: 4,
|
|
116
|
-
content: 'ct4'
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: 5,
|
|
120
|
-
content: 'ct5'
|
|
121
|
-
}
|
|
122
|
-
];
|
|
123
|
-
|
|
124
|
-
const meta: Meta = {
|
|
125
|
-
totalCount: 1200
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
return { todos, meta };
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
</script><% } %>
|
|
43
|
+
</script>
|
package/templates/app/quasar-v2/{js-webpack-4/index.js → ts-webpack-4/create-quasar-script.js}
RENAMED
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
export async function
|
|
1
|
+
export async function createQuasarScript({ scope, utils }) {
|
|
2
2
|
await utils.prompts(scope, [
|
|
3
3
|
{
|
|
4
4
|
type: 'multiselect',
|
|
5
5
|
name: 'preset',
|
|
6
6
|
message: 'Check the features needed for your project:',
|
|
7
7
|
choices: [
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
{
|
|
9
|
+
title: 'Sass CSS preprocessor',
|
|
10
|
+
value: 'sass',
|
|
11
|
+
selected: true
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: 'Linting (ESLint)',
|
|
15
|
+
value: 'eslint',
|
|
16
|
+
description: 'recommended',
|
|
17
|
+
selected: true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: 'State Management (Pinia)',
|
|
21
|
+
value: 'pinia',
|
|
22
|
+
description: 'https://pinia.vuejs.org'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: 'Internationalization (vue-i18n)',
|
|
26
|
+
value: 'i18n'
|
|
27
|
+
}
|
|
12
28
|
],
|
|
13
29
|
format: utils.convertArrayToObject
|
|
14
30
|
},
|
|
@@ -26,9 +42,10 @@ export async function script ({ scope, utils }) {
|
|
|
26
42
|
|
|
27
43
|
utils.createTargetDir(scope)
|
|
28
44
|
utils.renderTemplate('BASE', scope)
|
|
29
|
-
utils.renderTemplate(scope.css, scope)
|
|
30
45
|
|
|
31
|
-
|
|
46
|
+
const css = scope.preset.sass ? 'sass' : 'css'
|
|
47
|
+
utils.renderTemplate(css, scope)
|
|
48
|
+
|
|
32
49
|
if (scope.preset.i18n) utils.renderTemplate('i18n', scope)
|
|
33
50
|
if (scope.preset.eslint) utils.renderTemplate('eslint', scope)
|
|
34
51
|
if (scope.prettier) utils.renderTemplate('prettier', scope)
|
|
@@ -2,8 +2,8 @@ import js from '@eslint/js'
|
|
|
2
2
|
import globals from 'globals'
|
|
3
3
|
import pluginVue from 'eslint-plugin-vue'
|
|
4
4
|
import pluginQuasar from '@quasar/app-webpack/eslint'
|
|
5
|
-
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
|
6
|
-
import prettierSkipFormatting from '@vue/eslint-config-prettier/skip-formatting'<% } %>
|
|
5
|
+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
|
6
|
+
<% if (scope.prettier) { %>import prettierSkipFormatting from '@vue/eslint-config-prettier/skip-formatting'<% } %>
|
|
7
7
|
|
|
8
8
|
export default defineConfigWithVueTs(
|
|
9
9
|
{
|
|
@@ -81,7 +81,7 @@ export default defineConfigWithVueTs(
|
|
|
81
81
|
...globals.serviceworker
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
}<% if (prettier) { %>,
|
|
84
|
+
}<% if (scope.prettier) { %>,
|
|
85
85
|
|
|
86
86
|
prettierSkipFormatting<% } %>
|
|
87
87
|
)
|
|
@@ -23,8 +23,8 @@ declare module 'vue-i18n' {
|
|
|
23
23
|
|
|
24
24
|
export default defineBoot(({ app }) => {
|
|
25
25
|
const i18n = createI18n<{ message: MessageSchema }, MessageLanguages>({
|
|
26
|
-
locale: 'en-US'
|
|
27
|
-
legacy: false
|
|
26
|
+
locale: 'en-US',
|
|
27
|
+
legacy: false,
|
|
28
28
|
messages,
|
|
29
29
|
});
|
|
30
30
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { defineConfig } from 'eslint/config'
|
|
1
2
|
import globals from 'globals'
|
|
2
|
-
import tseslint from 'typescript-eslint'
|
|
3
3
|
import baseConfig from '../eslint.config.base.js'
|
|
4
4
|
|
|
5
|
-
export default
|
|
5
|
+
export default defineConfig(
|
|
6
6
|
...baseConfig,
|
|
7
7
|
|
|
8
8
|
{
|
|
@@ -27,9 +27,7 @@ export default tseslint.config(
|
|
|
27
27
|
|
|
28
28
|
'preset',
|
|
29
29
|
'orgName',
|
|
30
|
-
'license'
|
|
31
|
-
|
|
32
|
-
'codeFormat'
|
|
30
|
+
'license'
|
|
33
31
|
]
|
|
34
32
|
},
|
|
35
33
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Quasar App Extension <%= name %>
|
|
1
|
+
Quasar App Extension <%= scope.name %>
|
|
2
2
|
===
|
|
3
3
|
|
|
4
4
|
_Be sure to change this readme as appropriate for your app extension._
|
|
@@ -7,15 +7,15 @@ _Think about the organization of this file and how the information will be benef
|
|
|
7
7
|
|
|
8
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
9
|
|
|
10
|
-
<%= description %>
|
|
10
|
+
<%= scope.description %>
|
|
11
11
|
|
|
12
12
|
# Install
|
|
13
13
|
```bash
|
|
14
|
-
quasar ext add <%= name %>
|
|
14
|
+
quasar ext add <%= scope.name %>
|
|
15
15
|
```
|
|
16
16
|
Quasar CLI will retrieve it from the NPM registry and install the extension to your project.
|
|
17
17
|
|
|
18
|
-
<% if (preset.prompts) { %>
|
|
18
|
+
<% if (scope.preset.prompts) { %>
|
|
19
19
|
## Prompts
|
|
20
20
|
|
|
21
21
|
> Explain the prompts here
|
|
@@ -23,7 +23,7 @@ Quasar CLI will retrieve it from the NPM registry and install the extension to y
|
|
|
23
23
|
<% } %>
|
|
24
24
|
# Uninstall
|
|
25
25
|
```bash
|
|
26
|
-
quasar ext remove <%= name %>
|
|
26
|
+
quasar ext remove <%= scope.name %>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
# Info
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
<% if (needOrgName) { %>"name": "@<%= orgName %>/quasar-app-extension-<%= name %>",
|
|
3
|
-
<% } else { %>"name": "quasar-app-extension-<%= name %>",<% } %>
|
|
2
|
+
<% if (scope.needOrgName) { %>"name": "@<%= scope.orgName %>/quasar-app-extension-<%= scope.name %>",
|
|
3
|
+
<% } else { %>"name": "quasar-app-extension-<%= scope.name %>",<% } %>
|
|
4
4
|
"version": "0.0.1",
|
|
5
|
-
"description": "<%= description %>",
|
|
6
|
-
"author": "<%= author %>",
|
|
7
|
-
"license": "<%= license %>",
|
|
8
|
-
"type": "
|
|
5
|
+
"description": "<%= scope.description %>",
|
|
6
|
+
"author": "<%= scope.author %>",
|
|
7
|
+
"license": "<%= scope.license %>",
|
|
8
|
+
"type": "module",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"No test specified\" && exit 0"
|
|
11
11
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export async function
|
|
1
|
+
export async function createQuasarScript({ scope, utils }) {
|
|
2
2
|
await utils.prompts(scope, [
|
|
3
3
|
{
|
|
4
4
|
type: 'confirm',
|
|
@@ -16,22 +16,12 @@ export async function script ({ scope, utils }) {
|
|
|
16
16
|
{
|
|
17
17
|
type: 'text',
|
|
18
18
|
name: 'name',
|
|
19
|
-
message:
|
|
20
|
-
|
|
19
|
+
message:
|
|
20
|
+
'Quasar App Extension ext-id (without "quasar-app-extension" prefix), eg. "my-ext"',
|
|
21
|
+
validate: val =>
|
|
21
22
|
utils.isValidPackageName(val) || 'Invalid App Extension name'
|
|
22
23
|
},
|
|
23
24
|
|
|
24
|
-
{
|
|
25
|
-
type: 'select',
|
|
26
|
-
name: 'codeFormat',
|
|
27
|
-
message: 'Pick AE code format:',
|
|
28
|
-
initial: 0,
|
|
29
|
-
choices: [
|
|
30
|
-
{ title: 'ESM (q/app-vite >= 1.5, q/app-webpack >= 3.10)', value: 'esm', description: 'recommended' },
|
|
31
|
-
{ title: 'CommonJS', value: 'commonjs' }
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
|
|
35
25
|
utils.commonPrompts.description
|
|
36
26
|
])
|
|
37
27
|
|
|
@@ -14,17 +14,17 @@ Compatible with:
|
|
|
14
14
|
# Development
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
$ <%= packageManager?.name ?? 'pnpm' %> i # install the dependencies
|
|
17
|
+
$ <%= scope.packageManager?.name ?? 'pnpm' %> i # install the dependencies
|
|
18
18
|
|
|
19
|
-
$ <%= packageManager?.name ?? 'pnpm' %> build # build the app-extension. Run this after making any change in ./app-extension
|
|
19
|
+
$ <%= scope.packageManager?.name ?? 'pnpm' %> build # build the app-extension. Run this after making any change in ./app-extension
|
|
20
20
|
|
|
21
|
-
$ <%= packageManager?.name ?? 'pnpm' %> dev:vite # start the app-vite playground
|
|
22
|
-
$ <%= packageManager?.name ?? 'pnpm' %> dev:webpack # start the app-webpack playground
|
|
21
|
+
$ <%= scope.packageManager?.name ?? 'pnpm' %> dev:vite # start the app-vite playground
|
|
22
|
+
$ <%= scope.packageManager?.name ?? 'pnpm' %> dev:webpack # start the app-webpack playground
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
For more development-related explanation, see:
|
|
26
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)<% } %>
|
|
27
|
+
<% if (scope.preset.install) { %>- [`app-extension/src/templates/README.md`](app-extension/src/templates/README.md)<% } %>
|
|
28
28
|
|
|
29
29
|
# Donate
|
|
30
30
|
|
|
@@ -32,4 +32,4 @@ If you appreciate the work that went into this project, please consider [donatin
|
|
|
32
32
|
|
|
33
33
|
# License
|
|
34
34
|
|
|
35
|
-
<%= license %> (c) <%= author %>
|
|
35
|
+
<%= scope.license %> (c) <%= scope.author %>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import eslint from '@eslint/js';
|
|
2
|
-
import
|
|
2
|
+
import { defineConfig } from 'eslint/config';
|
|
3
3
|
import pluginVue from 'eslint-plugin-vue';
|
|
4
4
|
import configPrettier from 'eslint-config-prettier';
|
|
5
5
|
import globals from 'globals';
|
|
6
|
+
import tseslint from 'typescript-eslint';
|
|
6
7
|
import { version as vueVersion } from 'vue';
|
|
7
8
|
|
|
8
|
-
export default
|
|
9
|
+
export default defineConfig(
|
|
9
10
|
{
|
|
10
11
|
name: 'eslint/recommended',
|
|
11
12
|
...eslint.configs.recommended,
|