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 (ESLint)',
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-webpack/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
  {
@@ -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',<% if (sfcStyle === 'composition' || sfcStyle === 'composition-setup') { %>
27
- legacy: false,<% } %>
26
+ locale: 'en-US',
27
+ legacy: false,
28
28
  messages,
29
29
  });
30
30
 
@@ -27,9 +27,7 @@ export default defineConfig(
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": "<%= codeFormat === 'esm' ? 'module' : 'commonjs' %>",
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
  },
@@ -5,6 +5,6 @@
5
5
  * Docs: https://quasar.dev/app-extensions/development-guide/index-api
6
6
  */
7
7
 
8
- <%= codeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
8
+ export default function (api) {
9
9
  //
10
10
  }
@@ -22,21 +22,6 @@ export async function createQuasarScript({ scope, utils }) {
22
22
  utils.isValidPackageName(val) || 'Invalid App Extension name'
23
23
  },
24
24
 
25
- {
26
- type: 'select',
27
- name: 'codeFormat',
28
- message: 'Pick AE code format:',
29
- initial: 0,
30
- choices: [
31
- {
32
- title: 'ESM (q/app-vite >= 1.5, q/app-webpack >= 3.10)',
33
- value: 'esm',
34
- description: 'recommended'
35
- },
36
- { title: 'CommonJS', value: 'commonjs' }
37
- ]
38
- },
39
-
40
25
  utils.commonPrompts.description
41
26
  ])
42
27
 
@@ -4,6 +4,6 @@
4
4
  * Docs: https://quasar.dev/app-extensions/development-guide/install-api
5
5
  */
6
6
 
7
- <%= codeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
7
+ export default function (api) {
8
8
  //
9
9
  }
@@ -39,6 +39,6 @@
39
39
 
40
40
  */
41
41
 
42
- <%= codeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
42
+ export default function (api) {
43
43
  return []
44
44
  }
@@ -4,6 +4,6 @@
4
4
  * Docs: https://quasar.dev/app-extensions/development-guide/uninstall-api
5
5
  */
6
6
 
7
- <%= codeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) {
7
+ export default function (api) {
8
8
  //
9
9
  }
@@ -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 %>