create-quasar 2.1.1 → 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.
Files changed (153) hide show
  1. package/package.json +2 -4
  2. package/scripts/create-test-project.ts +1 -3
  3. package/templates/app/__eslint.config.js +0 -1
  4. package/templates/app/quasar-v2/create-quasar-script.js +4 -35
  5. package/templates/app/quasar-v2/js-vite-2/BASE/README.md +4 -4
  6. package/templates/app/quasar-v2/js-vite-2/BASE/_.vscode/extensions.json +2 -2
  7. package/templates/app/quasar-v2/js-vite-2/BASE/_.vscode/settings.json +2 -2
  8. package/templates/app/quasar-v2/js-vite-2/BASE/_package.json +11 -12
  9. package/templates/app/quasar-v2/js-vite-2/BASE/index.html +3 -3
  10. package/templates/app/quasar-v2/js-vite-2/BASE/quasar.config.js +9 -10
  11. package/templates/app/quasar-v2/js-vite-2/BASE/src/App.vue +0 -11
  12. package/templates/app/quasar-v2/js-vite-2/BASE/src/components/EssentialLink.vue +7 -35
  13. package/templates/app/quasar-v2/js-vite-2/BASE/src/layouts/MainLayout.vue +2 -141
  14. package/templates/app/quasar-v2/js-vite-2/BASE/src/pages/ErrorNotFound.vue +0 -11
  15. package/templates/app/quasar-v2/js-vite-2/BASE/src/pages/IndexPage.vue +0 -11
  16. package/templates/app/quasar-v2/js-vite-2/create-quasar-script.js +12 -4
  17. package/templates/app/quasar-v2/js-vite-2/eslint/_eslint.config.js +3 -3
  18. package/templates/app/quasar-v2/js-webpack-4/BASE/README.md +4 -4
  19. package/templates/app/quasar-v2/js-webpack-4/BASE/_.vscode/extensions.json +2 -2
  20. package/templates/app/quasar-v2/js-webpack-4/BASE/_.vscode/settings.json +2 -2
  21. package/templates/app/quasar-v2/js-webpack-4/BASE/_package.json +10 -11
  22. package/templates/app/quasar-v2/js-webpack-4/BASE/index.html +3 -3
  23. package/templates/app/quasar-v2/js-webpack-4/BASE/quasar.config.js +5 -6
  24. package/templates/app/quasar-v2/js-webpack-4/BASE/src/App.vue +0 -11
  25. package/templates/app/quasar-v2/js-webpack-4/BASE/src/components/EssentialLink.vue +7 -35
  26. package/templates/app/quasar-v2/js-webpack-4/BASE/src/layouts/MainLayout.vue +2 -141
  27. package/templates/app/quasar-v2/js-webpack-4/BASE/src/pages/ErrorNotFound.vue +0 -11
  28. package/templates/app/quasar-v2/js-webpack-4/BASE/src/pages/IndexPage.vue +0 -11
  29. package/templates/app/quasar-v2/js-webpack-4/create-quasar-script.js +12 -4
  30. package/templates/app/quasar-v2/js-webpack-4/eslint/_eslint.config.js +3 -3
  31. package/templates/app/quasar-v2/ts-vite-2/BASE/README.md +4 -4
  32. package/templates/app/quasar-v2/ts-vite-2/BASE/_.vscode/extensions.json +2 -2
  33. package/templates/app/quasar-v2/ts-vite-2/BASE/_.vscode/settings.json +2 -2
  34. package/templates/app/quasar-v2/ts-vite-2/BASE/_package.json +11 -12
  35. package/templates/app/quasar-v2/ts-vite-2/BASE/index.html +3 -3
  36. package/templates/app/quasar-v2/ts-vite-2/BASE/quasar.config.ts +9 -10
  37. package/templates/app/quasar-v2/ts-vite-2/BASE/src/App.vue +0 -11
  38. package/templates/app/quasar-v2/ts-vite-2/BASE/src/components/EssentialLink.vue +2 -37
  39. package/templates/app/quasar-v2/ts-vite-2/BASE/src/components/ExampleComponent.vue +2 -98
  40. package/templates/app/quasar-v2/ts-vite-2/BASE/src/layouts/MainLayout.vue +2 -141
  41. package/templates/app/quasar-v2/ts-vite-2/BASE/src/pages/ErrorNotFound.vue +0 -11
  42. package/templates/app/quasar-v2/ts-vite-2/BASE/src/pages/IndexPage.vue +2 -90
  43. package/templates/app/quasar-v2/ts-vite-2/__.eslintrc.cjs +0 -1
  44. package/templates/app/quasar-v2/ts-vite-2/create-quasar-script.js +12 -4
  45. package/templates/app/quasar-v2/ts-vite-2/eslint/_eslint.config.js +3 -3
  46. package/templates/app/quasar-v2/ts-vite-2/i18n/src/boot/i18n.ts +2 -2
  47. package/templates/app/quasar-v2/ts-webpack-4/BASE/README.md +4 -4
  48. package/templates/app/quasar-v2/ts-webpack-4/BASE/_.vscode/extensions.json +2 -2
  49. package/templates/app/quasar-v2/ts-webpack-4/BASE/_.vscode/settings.json +2 -2
  50. package/templates/app/quasar-v2/ts-webpack-4/BASE/_package.json +10 -11
  51. package/templates/app/quasar-v2/ts-webpack-4/BASE/index.html +3 -3
  52. package/templates/app/quasar-v2/ts-webpack-4/BASE/quasar.config.ts +5 -6
  53. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/App.vue +0 -11
  54. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/components/EssentialLink.vue +2 -37
  55. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/components/ExampleComponent.vue +2 -98
  56. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/layouts/MainLayout.vue +2 -141
  57. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/pages/ErrorNotFound.vue +0 -11
  58. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/pages/IndexPage.vue +2 -90
  59. package/templates/app/quasar-v2/ts-webpack-4/__.eslintrc.cjs +0 -1
  60. package/templates/app/quasar-v2/ts-webpack-4/create-quasar-script.js +12 -4
  61. package/templates/app/quasar-v2/ts-webpack-4/eslint/_eslint.config.js +3 -3
  62. package/templates/app/quasar-v2/ts-webpack-4/i18n/src/boot/i18n.ts +2 -2
  63. package/templates/app-extension/__eslint.config.js +1 -3
  64. package/templates/app-extension/ae-js/BASE/README.md +5 -5
  65. package/templates/app-extension/ae-js/BASE/_package.json +6 -6
  66. package/templates/app-extension/ae-js/BASE/src/index.js +1 -1
  67. package/templates/app-extension/ae-js/create-quasar-script.js +0 -15
  68. package/templates/app-extension/ae-js/install-script/src/install.js +1 -1
  69. package/templates/app-extension/ae-js/prompts-script/src/prompts.js +1 -1
  70. package/templates/app-extension/ae-js/uninstall-script/src/uninstall.js +1 -1
  71. package/templates/app-extension/ae-ts/BASE/README.md +6 -6
  72. package/templates/app-extension/ae-ts/BASE/_package.json +9 -9
  73. package/templates/app-extension/ae-ts/BASE/app-extension/README.md +7 -7
  74. package/templates/app-extension/ae-ts/BASE/app-extension/_package.json +9 -9
  75. package/templates/app-extension/ae-ts/BASE/app-extension/src/index.ts +2 -2
  76. package/templates/app-extension/ae-ts/BASE/app-extension/src/runtime/README.md +3 -3
  77. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/README.md +11 -11
  78. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/_package.json +4 -4
  79. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/index.html +3 -3
  80. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/quasar.extensions.json +1 -1
  81. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/quasar.d.ts +1 -1
  82. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/README.md +10 -10
  83. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/_package.json +4 -4
  84. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/index.html +3 -3
  85. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/quasar.extensions.json +1 -1
  86. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/quasar.d.ts +1 -1
  87. package/templates/app-extension/create-quasar-script.js +1 -0
  88. package/templates/ui-kit/quasar-v2/BASE/LICENSE +1 -1
  89. package/templates/ui-kit/quasar-v2/BASE/README.md +4 -4
  90. package/templates/ui-kit/quasar-v2/BASE/ui/README.md +29 -29
  91. package/templates/ui-kit/quasar-v2/BASE/ui/_package.json +4 -4
  92. package/templates/ui-kit/quasar-v2/BASE/ui/build/index.js +1 -1
  93. package/templates/ui-kit/quasar-v2/BASE/ui/build/script.javascript.js +2 -2
  94. package/templates/ui-kit/quasar-v2/BASE/ui/dev/src/index.template.html +10 -5
  95. package/templates/ui-kit/quasar-v2/BASE/ui/dev/src/layouts/MyLayout.vue +1 -1
  96. package/templates/ui-kit/quasar-v2/BASE/ui/dev/src/pages/Test1.vue +4 -4
  97. package/templates/ui-kit/quasar-v2/BASE/ui/src/index.sass +2 -2
  98. package/templates/ui-kit/quasar-v2/BASE/ui/src/vue-plugin.js +6 -6
  99. package/templates/ui-kit/quasar-v2/BASE/ui/umd-test.html +2 -2
  100. package/templates/ui-kit/quasar-v2/ae/app-extension/README.md +6 -6
  101. package/templates/ui-kit/quasar-v2/ae/app-extension/_package.json +5 -5
  102. package/templates/ui-kit/quasar-v2/ae/app-extension/src/boot/register.js +1 -1
  103. package/templates/ui-kit/quasar-v2/ae/app-extension/src/index.js +7 -7
  104. package/templates/ui-kit/quasar-v2/ui-component/ui/src/components/Component.js +3 -3
  105. package/templates/ui-kit/quasar-v2/ui-component/ui/src/components/Component.sass +1 -1
  106. package/templates/ui-kit/quasar-v2/ui-directive/ui/src/directives/Directive.js +1 -1
  107. package/templates/ui-kit/quasar-v2/ui-directive/ui/src/directives/Directive.sass +1 -1
  108. package/utils/index.js +2 -6
  109. package/utils/template.js +280 -0
  110. package/templates/app/quasar-v2/js-vite-2/axios/src/boot/axios.js +0 -24
  111. package/templates/app/quasar-v2/js-vite-2/scss/src/css/app.scss +0 -1
  112. package/templates/app/quasar-v2/js-vite-2/scss/src/css/quasar.variables.scss +0 -25
  113. package/templates/app/quasar-v2/js-webpack-4/axios/src/boot/axios.js +0 -24
  114. package/templates/app/quasar-v2/js-webpack-4/scss/src/css/app.scss +0 -1
  115. package/templates/app/quasar-v2/js-webpack-4/scss/src/css/quasar.variables.scss +0 -25
  116. package/templates/app/quasar-v2/ts-vite-2/axios/src/boot/axios.ts +0 -31
  117. package/templates/app/quasar-v2/ts-vite-2/scss/src/css/app.scss +0 -1
  118. package/templates/app/quasar-v2/ts-vite-2/scss/src/css/quasar.variables.scss +0 -25
  119. package/templates/app/quasar-v2/ts-webpack-4/axios/src/boot/axios.ts +0 -31
  120. package/templates/app/quasar-v2/ts-webpack-4/scss/src/css/app.scss +0 -1
  121. package/templates/app/quasar-v2/ts-webpack-4/scss/src/css/quasar.variables.scss +0 -25
  122. package/test-project/.editorconfig +0 -7
  123. package/test-project/.prettierrc.json +0 -5
  124. package/test-project/.vscode/extensions.json +0 -15
  125. package/test-project/.vscode/settings.json +0 -9
  126. package/test-project/README.md +0 -43
  127. package/test-project/eslint.config.js +0 -83
  128. package/test-project/index.html +0 -24
  129. package/test-project/package.json +0 -45
  130. package/test-project/pnpm-lock.yaml +0 -5293
  131. package/test-project/pnpm-workspace.yaml +0 -6
  132. package/test-project/postcss.config.js +0 -29
  133. package/test-project/public/favicon.ico +0 -0
  134. package/test-project/public/icons/favicon-128x128.png +0 -0
  135. package/test-project/public/icons/favicon-16x16.png +0 -0
  136. package/test-project/public/icons/favicon-32x32.png +0 -0
  137. package/test-project/public/icons/favicon-96x96.png +0 -0
  138. package/test-project/quasar.config.ts +0 -217
  139. package/test-project/src/App.vue +0 -7
  140. package/test-project/src/assets/quasar-logo-vertical.svg +0 -15
  141. package/test-project/src/boot/.gitkeep +0 -0
  142. package/test-project/src/components/EssentialLink.vue +0 -27
  143. package/test-project/src/components/ExampleComponent.vue +0 -37
  144. package/test-project/src/components/models.ts +0 -8
  145. package/test-project/src/css/app.scss +0 -1
  146. package/test-project/src/css/quasar.variables.scss +0 -25
  147. package/test-project/src/env.d.ts +0 -7
  148. package/test-project/src/layouts/MainLayout.vue +0 -81
  149. package/test-project/src/pages/ErrorNotFound.vue +0 -23
  150. package/test-project/src/pages/IndexPage.vue +0 -43
  151. package/test-project/src/router/index.ts +0 -37
  152. package/test-project/src/router/routes.ts +0 -18
  153. package/test-project/tsconfig.json +0 -3
@@ -18,7 +18,7 @@
18
18
  </q-item-section>
19
19
  </q-item>
20
20
  </template>
21
- <% if (sfcStyle === 'composition-setup') { %>
21
+
22
22
  <script setup lang="ts">
23
23
  export interface EssentialLinkProps {
24
24
  title: string;
@@ -32,39 +32,4 @@ withDefaults(defineProps<EssentialLinkProps>(), {
32
32
  link: '#',
33
33
  icon: '',
34
34
  });
35
- </script><% } else if (sfcStyle === 'composition' || sfcStyle === 'options') { %>
36
- <script lang="ts">
37
- import { defineComponent } from 'vue';
38
-
39
- export interface EssentialLinkProps {
40
- title: string;
41
- caption?: string;
42
- link?: string;
43
- icon?: string;
44
- };
45
-
46
- export default defineComponent({
47
- name: 'EssentialLink',
48
- props: {
49
- title: {
50
- type: String,
51
- required: true
52
- },
53
-
54
- caption: {
55
- type: String,
56
- default: ''
57
- },
58
-
59
- link: {
60
- type: String,
61
- default: '#'
62
- },
63
-
64
- icon: {
65
- type: String,
66
- default: ''
67
- }
68
- }
69
- });
70
- </script><% } %>
35
+ </script>
@@ -11,7 +11,7 @@
11
11
  <p>Clicks on todos: {{ clickCount }}</p>
12
12
  </div>
13
13
  </template>
14
- <% if (sfcStyle === 'composition-setup') { %>
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><% } else if (sfcStyle === 'composition') { %>
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
- <% if (sfcStyle === 'composition-setup') { %>
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><% } else if (sfcStyle === 'composition') { %>
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
- <% if (sfcStyle === 'composition-setup') { %>
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><% } else if (sfcStyle === 'composition') { %>
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>
@@ -12,7 +12,6 @@ module.exports = {
12
12
  'productName',
13
13
 
14
14
  // Quasar v2 - TS
15
- 'sfcStyle',
16
15
  'css',
17
16
  'preset',
18
17
  'prettier'
@@ -5,6 +5,11 @@ export async function createQuasarScript({ scope, utils }) {
5
5
  name: 'preset',
6
6
  message: 'Check the features needed for your project:',
7
7
  choices: [
8
+ {
9
+ title: 'Sass CSS preprocessor',
10
+ value: 'sass',
11
+ selected: true
12
+ },
8
13
  {
9
14
  title: 'Linting (vite-plugin-checker + ESLint + vue-tsc)',
10
15
  value: 'eslint',
@@ -16,8 +21,10 @@ export async function createQuasarScript({ scope, utils }) {
16
21
  value: 'pinia',
17
22
  description: 'https://pinia.vuejs.org'
18
23
  },
19
- { title: 'axios', value: 'axios' },
20
- { title: 'vue-i18n', value: 'i18n' }
24
+ {
25
+ title: 'Internationalization (vue-i18n)',
26
+ value: 'i18n'
27
+ }
21
28
  ],
22
29
  format: utils.convertArrayToObject
23
30
  },
@@ -35,9 +42,10 @@ export async function createQuasarScript({ scope, utils }) {
35
42
 
36
43
  utils.createTargetDir(scope)
37
44
  utils.renderTemplate('BASE', scope)
38
- utils.renderTemplate(scope.css, scope)
39
45
 
40
- if (scope.preset.axios) utils.renderTemplate('axios', scope)
46
+ const css = scope.preset.sass ? 'sass' : 'css'
47
+ utils.renderTemplate(css, scope)
48
+
41
49
  if (scope.preset.i18n) utils.renderTemplate('i18n', scope)
42
50
  if (scope.preset.eslint) utils.renderTemplate('eslint', scope)
43
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-vite/eslint'
5
- import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'<% if (prettier) { %>
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
  {
@@ -80,7 +80,7 @@ export default defineConfigWithVueTs(
80
80
  ...globals.serviceworker
81
81
  }
82
82
  }
83
- }<% if (prettier) { %>,
83
+ }<% if (scope.prettier) { %>,
84
84
 
85
85
  prettierSkipFormatting<% } %>
86
86
  )
@@ -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',<% if (sfcStyle === 'composition' || sfcStyle === 'composition-setup') { %>
27
- legacy: false,<% } %>
26
+ locale: 'en-US',
27
+ legacy: false,
28
28
  messages,
29
29
  });
30
30
 
@@ -1,6 +1,6 @@
1
- # <%= productName %> (<%= name %>)
1
+ # <%= scope.productName %> (<%= scope.name %>)
2
2
 
3
- <%= description %>
3
+ <%= scope.description %>
4
4
 
5
5
  ## Install the dependencies
6
6
  ```bash
@@ -13,7 +13,7 @@ npm install
13
13
  ```bash
14
14
  quasar dev
15
15
  ```
16
- <% if (preset.eslint) { %>
16
+ <% if (scope.preset.eslint) { %>
17
17
 
18
18
  ### Lint the files
19
19
  ```bash
@@ -21,7 +21,7 @@ yarn lint
21
21
  # or
22
22
  npm run lint
23
23
  ```
24
- <% if (prettier) { %>
24
+ <% if (scope.prettier) { %>
25
25
 
26
26
  ### Format the files
27
27
  ```bash
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "recommendations": [
3
- <% if (preset.eslint) { %>"dbaeumer.vscode-eslint",<% } %>
4
- <% if (prettier) { %>"esbenp.prettier-vscode",<% } %>
3
+ <% if (scope.preset.eslint) { %>"dbaeumer.vscode-eslint",<% } %>
4
+ <% if (scope.prettier) { %>"esbenp.prettier-vscode",<% } %>
5
5
  "editorconfig.editorconfig",
6
6
  "vue.volar",
7
7
  "wayou.vscode-todo-highlight"
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "editor.bracketPairColorization.enabled": true,
3
- "editor.guides.bracketPairs": true,<% if (preset.eslint) { %>
3
+ "editor.guides.bracketPairs": true,<% if (scope.preset.eslint) { %>
4
4
  "editor.formatOnSave": true,
5
- "editor.defaultFormatter": <% if (prettier) { %>"esbenp.prettier-vscode"<% } else { %>"dbaeumer.vscode-eslint"<% } %>,
5
+ "editor.defaultFormatter": <% if (scope.prettier) { %>"esbenp.prettier-vscode"<% } else { %>"dbaeumer.vscode-eslint"<% } %>,
6
6
  "editor.codeActionsOnSave": [
7
7
  "source.fixAll.eslint"
8
8
  ],
@@ -1,23 +1,22 @@
1
1
  {
2
- "name": "<%= name %>",
2
+ "name": "<%= scope.name %>",
3
3
  "version": "0.0.1",
4
- "description": "<%= description %>",
5
- "productName": "<%= productName %>",
6
- "author": "<%= author %>",
4
+ "description": "<%= scope.description %>",
5
+ "productName": "<%= scope.productName %>",
6
+ "author": "<%= scope.author %>",
7
7
  "private": true,
8
8
  "type": "module",
9
9
  "scripts": {
10
- <% if (preset.eslint) { %>"lint": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\"",<% } %>
11
- <% if (prettier) { %>"format": "prettier --write \"**/*.{js,ts,vue,<% if (css !== 'sass') { %><%= css %><% } %>,html,md,json}\" --ignore-path .gitignore",<% } %>
10
+ <% if (scope.preset.eslint) { %>"lint": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\"",<% } %>
11
+ <% if (scope.prettier) { %>"format": "prettier --write \"**/*.{js,ts,vue,css<% if (scope.preset.sass) { %>,scss<% } %>,html,md,json}\" --ignore-path .gitignore",<% } %>
12
12
  "test": "echo \"No test specified\" && exit 0",
13
13
  "dev": "quasar dev",
14
14
  "build": "quasar build",
15
15
  "postinstall": "quasar prepare"
16
16
  },
17
17
  "dependencies": {
18
- <% if (preset.axios) { %>"axios": "^1.13.6",<% } %>
19
- <% if (preset.i18n) { %>"vue-i18n": "^11.3.0",<% } %>
20
- <% if (preset.pinia) { %>"pinia": "^3.0.1",<% } %>
18
+ <% if (scope.preset.i18n) { %>"vue-i18n": "^11.3.0",<% } %>
19
+ <% if (scope.preset.pinia) { %>"pinia": "^3.0.1",<% } %>
21
20
  "@quasar/extras": "^1.16.4",
22
21
  "core-js": "^3.6.5",
23
22
  "quasar": "^2.16.0",
@@ -25,7 +24,7 @@
25
24
  "vue-router": "^5.0.3"
26
25
  },
27
26
  "devDependencies": {
28
- <% if (preset.eslint) { %>
27
+ <% if (scope.preset.eslint) { %>
29
28
  "@eslint/js": "^9.14.0",
30
29
  "eslint": "^9.14.0",
31
30
  "eslint-plugin-vue": "^10.8.0",
@@ -34,7 +33,7 @@
34
33
  "globals": "^17.4.0",
35
34
  "vue-eslint-parser": "^10.4.0",
36
35
  <% } %>
37
- <% if (prettier) { %>
36
+ <% if (scope.prettier) { %>
38
37
  "@vue/eslint-config-prettier": "^10.2.0",
39
38
  "prettier": "^3.8.1",
40
39
  <% } %>
@@ -1,13 +1,13 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <title><%= '\<%= productName %\>' %></title>
4
+ <title><%= '<' + '%= productName %' + '>' %></title>
5
5
 
6
6
  <meta charset="utf-8">
7
- <meta name="description" content="<%= '\<%= productDescription %\>' %>">
7
+ <meta name="description" content="<%= '<' + '%= productDescription %' + '>' %>">
8
8
  <meta name="format-detection" content="telephone=no">
9
9
  <meta name="msapplication-tap-highlight" content="no">
10
- <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<%= '\<% if (ctx.mode.cordova || ctx.mode.capacitor) { %\>, viewport-fit=cover\<% } %\>' %>">
10
+ <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<%= '<' + '% if (ctx.mode.cordova || ctx.mode.capacitor) { %' + '>, viewport-fit=cover<' + '% } %' + '>' %>">
11
11
 
12
12
  <link rel="icon" type="image/png" sizes="128x128" href="icons/favicon-128x128.png">
13
13
  <link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png">
@@ -1,14 +1,14 @@
1
1
  // Configuration for your app
2
2
  // https://v2.quasar.dev/quasar-cli-webpack/quasar-config-file
3
3
 
4
- <% if (preset.eslint) { %>
4
+ <% if (scope.preset.eslint) { %>
5
5
  /* eslint-disable @typescript-eslint/no-var-requires */
6
6
  <% } %>
7
7
  import { defineConfig } from '#q-app/wrappers';
8
8
 
9
9
  export default defineConfig((/* ctx */) => {
10
10
  return {
11
- <% if (preset.eslint) { %>eslint: {
11
+ <% if (scope.preset.eslint) { %>eslint: {
12
12
  // fix: true,
13
13
  // include: [],
14
14
  // exclude: [],
@@ -25,13 +25,12 @@ export default defineConfig((/* ctx */) => {
25
25
  // --> boot files are part of "main.js"
26
26
  // https://v2.quasar.dev/quasar-cli-webpack/boot-files
27
27
  boot: [
28
- <% if (preset.i18n) { %>'i18n',<% } %>
29
- <% if (preset.axios) { %>'axios',<% } %>
28
+ <% if (scope.preset.i18n) { %>'i18n'<% } %>
30
29
  ],
31
30
 
32
31
  // https://v2.quasar.dev/quasar-cli-webpack/quasar-config-file#css
33
32
  css: [
34
- 'app.<%= css %>'
33
+ 'app.<%= scope.preset.sass ? 'sass' : 'css' %>'
35
34
  ],
36
35
 
37
36
  // https://github.com/quasarframework/quasar/tree/dev/extras
@@ -207,7 +206,7 @@ export default defineConfig((/* ctx */) => {
207
206
  builder: {
208
207
  // https://www.electron.build/configuration
209
208
 
210
- appId: '<%= name %>'
209
+ appId: '<%= scope.name %>'
211
210
  }
212
211
  },
213
212
 
@@ -1,14 +1,3 @@
1
1
  <template>
2
2
  <router-view />
3
3
  </template>
4
- <% if (sfcStyle === 'composition-setup') { %>
5
- <script setup lang="ts">
6
- //
7
- </script><% } else if (sfcStyle === 'composition' || sfcStyle === 'options') { %>
8
- <script lang="ts">
9
- import { defineComponent } from 'vue';
10
-
11
- export default defineComponent({
12
- name: 'App'
13
- });
14
- </script><% } %>