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.
Files changed (139) hide show
  1. package/index.js +72 -54
  2. package/package.json +14 -18
  3. package/scripts/create-test-project.ts +26 -25
  4. package/templates/{eslint.config.base.js → __eslint.config.base.js} +3 -2
  5. package/templates/app/{eslint.config.js → __eslint.config.js} +2 -3
  6. package/templates/app/create-quasar-script.js +8 -0
  7. package/templates/app/quasar-v2/create-quasar-script.js +39 -0
  8. package/templates/app/quasar-v2/js-vite-2/BASE/README.md +4 -4
  9. package/templates/app/quasar-v2/js-vite-2/BASE/_.vscode/extensions.json +2 -2
  10. package/templates/app/quasar-v2/js-vite-2/BASE/_.vscode/settings.json +2 -2
  11. package/templates/app/quasar-v2/js-vite-2/BASE/_package.json +13 -14
  12. package/templates/app/quasar-v2/js-vite-2/BASE/index.html +3 -3
  13. package/templates/app/quasar-v2/js-vite-2/BASE/quasar.config.js +9 -10
  14. package/templates/app/quasar-v2/js-vite-2/BASE/src/App.vue +0 -11
  15. package/templates/app/quasar-v2/js-vite-2/BASE/src/components/EssentialLink.vue +7 -35
  16. package/templates/app/quasar-v2/js-vite-2/BASE/src/layouts/MainLayout.vue +2 -141
  17. package/templates/app/quasar-v2/js-vite-2/BASE/src/pages/ErrorNotFound.vue +0 -11
  18. package/templates/app/quasar-v2/js-vite-2/BASE/src/pages/IndexPage.vue +0 -11
  19. package/templates/app/quasar-v2/{ts-webpack-4/index.js → js-vite-2/create-quasar-script.js} +24 -7
  20. package/templates/app/quasar-v2/js-vite-2/eslint/_eslint.config.js +3 -3
  21. package/templates/app/quasar-v2/js-webpack-4/BASE/README.md +4 -4
  22. package/templates/app/quasar-v2/js-webpack-4/BASE/_.vscode/extensions.json +2 -2
  23. package/templates/app/quasar-v2/js-webpack-4/BASE/_.vscode/settings.json +2 -2
  24. package/templates/app/quasar-v2/js-webpack-4/BASE/_package.json +10 -11
  25. package/templates/app/quasar-v2/js-webpack-4/BASE/index.html +3 -3
  26. package/templates/app/quasar-v2/js-webpack-4/BASE/quasar.config.js +5 -6
  27. package/templates/app/quasar-v2/js-webpack-4/BASE/src/App.vue +0 -11
  28. package/templates/app/quasar-v2/js-webpack-4/BASE/src/components/EssentialLink.vue +7 -35
  29. package/templates/app/quasar-v2/js-webpack-4/BASE/src/layouts/MainLayout.vue +2 -141
  30. package/templates/app/quasar-v2/js-webpack-4/BASE/src/pages/ErrorNotFound.vue +0 -11
  31. package/templates/app/quasar-v2/js-webpack-4/BASE/src/pages/IndexPage.vue +0 -11
  32. package/templates/app/quasar-v2/{js-vite-2/index.js → js-webpack-4/create-quasar-script.js} +24 -7
  33. package/templates/app/quasar-v2/js-webpack-4/eslint/_eslint.config.js +3 -3
  34. package/templates/app/quasar-v2/ts-vite-2/BASE/README.md +4 -4
  35. package/templates/app/quasar-v2/ts-vite-2/BASE/_.vscode/extensions.json +2 -2
  36. package/templates/app/quasar-v2/ts-vite-2/BASE/_.vscode/settings.json +2 -2
  37. package/templates/app/quasar-v2/ts-vite-2/BASE/_package.json +13 -14
  38. package/templates/app/quasar-v2/ts-vite-2/BASE/index.html +3 -3
  39. package/templates/app/quasar-v2/ts-vite-2/BASE/quasar.config.ts +9 -10
  40. package/templates/app/quasar-v2/ts-vite-2/BASE/src/App.vue +0 -11
  41. package/templates/app/quasar-v2/ts-vite-2/BASE/src/components/EssentialLink.vue +2 -37
  42. package/templates/app/quasar-v2/ts-vite-2/BASE/src/components/ExampleComponent.vue +2 -98
  43. package/templates/app/quasar-v2/ts-vite-2/BASE/src/layouts/MainLayout.vue +2 -141
  44. package/templates/app/quasar-v2/ts-vite-2/BASE/src/pages/ErrorNotFound.vue +0 -11
  45. package/templates/app/quasar-v2/ts-vite-2/BASE/src/pages/IndexPage.vue +2 -90
  46. package/templates/app/quasar-v2/{ts-webpack-4/.eslintrc.cjs → ts-vite-2/__.eslintrc.cjs} +0 -1
  47. package/templates/app/quasar-v2/ts-vite-2/{index.js → create-quasar-script.js} +24 -7
  48. package/templates/app/quasar-v2/ts-vite-2/eslint/_eslint.config.js +3 -3
  49. package/templates/app/quasar-v2/ts-vite-2/i18n/src/boot/i18n.ts +2 -2
  50. package/templates/app/quasar-v2/ts-webpack-4/BASE/README.md +4 -4
  51. package/templates/app/quasar-v2/ts-webpack-4/BASE/_.vscode/extensions.json +2 -2
  52. package/templates/app/quasar-v2/ts-webpack-4/BASE/_.vscode/settings.json +2 -2
  53. package/templates/app/quasar-v2/ts-webpack-4/BASE/_package.json +10 -11
  54. package/templates/app/quasar-v2/ts-webpack-4/BASE/index.html +3 -3
  55. package/templates/app/quasar-v2/ts-webpack-4/BASE/quasar.config.ts +5 -6
  56. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/App.vue +0 -11
  57. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/components/EssentialLink.vue +2 -37
  58. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/components/ExampleComponent.vue +2 -98
  59. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/layouts/MainLayout.vue +2 -141
  60. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/pages/ErrorNotFound.vue +0 -11
  61. package/templates/app/quasar-v2/ts-webpack-4/BASE/src/pages/IndexPage.vue +2 -90
  62. package/templates/app/quasar-v2/{ts-vite-2/.eslintrc.cjs → ts-webpack-4/__.eslintrc.cjs} +0 -1
  63. package/templates/app/quasar-v2/{js-webpack-4/index.js → ts-webpack-4/create-quasar-script.js} +24 -7
  64. package/templates/app/quasar-v2/ts-webpack-4/eslint/_eslint.config.js +3 -3
  65. package/templates/app/quasar-v2/ts-webpack-4/i18n/src/boot/i18n.ts +2 -2
  66. package/templates/app-extension/{eslint.config.js → __eslint.config.js} +3 -5
  67. package/templates/app-extension/ae-js/BASE/README.md +5 -5
  68. package/templates/app-extension/ae-js/BASE/_package.json +6 -6
  69. package/templates/app-extension/ae-js/BASE/src/index.js +1 -1
  70. package/templates/app-extension/ae-js/{index.js → create-quasar-script.js} +4 -14
  71. package/templates/app-extension/ae-js/install-script/src/install.js +1 -1
  72. package/templates/app-extension/ae-js/prompts-script/src/prompts.js +1 -1
  73. package/templates/app-extension/ae-js/uninstall-script/src/uninstall.js +1 -1
  74. package/templates/app-extension/ae-ts/BASE/README.md +6 -6
  75. package/templates/app-extension/ae-ts/BASE/_eslint.config.js +3 -2
  76. package/templates/app-extension/ae-ts/BASE/_package.json +11 -11
  77. package/templates/app-extension/ae-ts/BASE/app-extension/README.md +7 -7
  78. package/templates/app-extension/ae-ts/BASE/app-extension/_package.json +9 -9
  79. package/templates/app-extension/ae-ts/BASE/app-extension/src/index.ts +2 -2
  80. package/templates/app-extension/ae-ts/BASE/app-extension/src/runtime/README.md +3 -3
  81. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/README.md +11 -11
  82. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/_package.json +4 -4
  83. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/index.html +3 -3
  84. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/quasar.config.ts +0 -2
  85. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/quasar.extensions.json +1 -1
  86. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-vite/src/quasar.d.ts +1 -1
  87. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/README.md +10 -10
  88. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/_package.json +4 -4
  89. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/index.html +3 -3
  90. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/quasar.config.ts +0 -2
  91. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/quasar.extensions.json +1 -1
  92. package/templates/app-extension/ae-ts/BASE/playground/quasar-cli-webpack/src/quasar.d.ts +1 -1
  93. package/templates/app-extension/ae-ts/{index.js → create-quasar-script.js} +11 -6
  94. package/templates/app-extension/create-quasar-script.js +17 -0
  95. package/templates/ui-kit/{eslint.config.js → __eslint.config.js} +2 -2
  96. package/templates/ui-kit/{index.js → create-quasar-script.js} +8 -5
  97. package/templates/ui-kit/quasar-v2/BASE/LICENSE +1 -1
  98. package/templates/ui-kit/quasar-v2/BASE/README.md +4 -4
  99. package/templates/ui-kit/quasar-v2/BASE/ui/README.md +29 -29
  100. package/templates/ui-kit/quasar-v2/BASE/ui/_package.json +4 -4
  101. package/templates/ui-kit/quasar-v2/BASE/ui/build/index.js +1 -1
  102. package/templates/ui-kit/quasar-v2/BASE/ui/build/script.javascript.js +2 -2
  103. package/templates/ui-kit/quasar-v2/BASE/ui/dev/src/index.template.html +10 -5
  104. package/templates/ui-kit/quasar-v2/BASE/ui/dev/src/layouts/MyLayout.vue +1 -1
  105. package/templates/ui-kit/quasar-v2/BASE/ui/dev/src/pages/Test1.vue +4 -4
  106. package/templates/ui-kit/quasar-v2/BASE/ui/src/index.sass +2 -2
  107. package/templates/ui-kit/quasar-v2/BASE/ui/src/vue-plugin.js +6 -6
  108. package/templates/ui-kit/quasar-v2/BASE/ui/umd-test.html +2 -2
  109. package/templates/ui-kit/quasar-v2/ae/app-extension/README.md +6 -6
  110. package/templates/ui-kit/quasar-v2/ae/app-extension/_package.json +5 -5
  111. package/templates/ui-kit/quasar-v2/ae/app-extension/src/boot/register.js +1 -1
  112. package/templates/ui-kit/quasar-v2/ae/app-extension/src/index.js +7 -7
  113. package/templates/ui-kit/quasar-v2/{index.js → create-quasar-script.js} +5 -2
  114. package/templates/ui-kit/quasar-v2/ui-component/ui/src/components/Component.js +3 -3
  115. package/templates/ui-kit/quasar-v2/ui-component/ui/src/components/Component.sass +1 -1
  116. package/templates/ui-kit/quasar-v2/ui-directive/ui/src/directives/Directive.js +1 -1
  117. package/templates/ui-kit/quasar-v2/ui-directive/ui/src/directives/Directive.sass +1 -1
  118. package/utils/index.js +106 -93
  119. package/utils/logger.js +52 -50
  120. package/utils/template.js +280 -0
  121. package/eslint.config.base.js +0 -19
  122. package/eslint.config.js +0 -47
  123. package/templates/app/index.js +0 -8
  124. package/templates/app/quasar-v2/index.js +0 -56
  125. package/templates/app/quasar-v2/js-vite-2/axios/src/boot/axios.js +0 -24
  126. package/templates/app/quasar-v2/js-vite-2/scss/src/css/app.scss +0 -1
  127. package/templates/app/quasar-v2/js-vite-2/scss/src/css/quasar.variables.scss +0 -25
  128. package/templates/app/quasar-v2/js-webpack-4/axios/src/boot/axios.js +0 -24
  129. package/templates/app/quasar-v2/js-webpack-4/scss/src/css/app.scss +0 -1
  130. package/templates/app/quasar-v2/js-webpack-4/scss/src/css/quasar.variables.scss +0 -25
  131. package/templates/app/quasar-v2/ts-vite-2/axios/src/boot/axios.ts +0 -31
  132. package/templates/app/quasar-v2/ts-vite-2/scss/src/css/app.scss +0 -1
  133. package/templates/app/quasar-v2/ts-vite-2/scss/src/css/quasar.variables.scss +0 -25
  134. package/templates/app/quasar-v2/ts-webpack-4/axios/src/boot/axios.ts +0 -31
  135. package/templates/app/quasar-v2/ts-webpack-4/scss/src/css/app.scss +0 -1
  136. package/templates/app/quasar-v2/ts-webpack-4/scss/src/css/quasar.variables.scss +0 -25
  137. package/templates/app-extension/index.js +0 -15
  138. /package/templates/app/quasar-v2/js-vite-2/{.eslintrc.cjs → __.eslintrc.cjs} +0 -0
  139. /package/templates/app/quasar-v2/js-webpack-4/{.eslintrc.cjs → __.eslintrc.cjs} +0 -0
@@ -0,0 +1,280 @@
1
+ /**
2
+ * Heavily inspired by Eta v4.5.1
3
+ */
4
+
5
+ const fnAccumulator = '__qstr__'
6
+ const defaultParseOptions = {
7
+ varName: 'scope',
8
+ exec: '', // never '-' | '_'
9
+ interpolate: '=', // never '-' | '_'
10
+ raw: '~', // never '-' | '_'
11
+ header: '',
12
+ tagStart: '<%',
13
+ tagEnd: '%>'
14
+ }
15
+
16
+ const newlineRE = /\n/
17
+ const newlineTrimRE = /^(?:\r\n|\n|\r)/
18
+ const escapeRegexpRE = /[.*+\-?^${}()|[\]\\]/g
19
+ const templateLitReg =
20
+ /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g
21
+ const singleQuoteReg = /'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g
22
+ const doubleQuoteReg = /"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g
23
+
24
+ function throwParseError(message, str, index) {
25
+ const whitespace = str.slice(0, index).split(newlineRE)
26
+
27
+ const lineNo = whitespace.length
28
+ const colNo = whitespace[lineNo - 1].length + 1
29
+
30
+ message +=
31
+ ' at line ' +
32
+ lineNo +
33
+ ' col ' +
34
+ colNo +
35
+ ':\n\n' +
36
+ ' ' +
37
+ str.split(newlineRE)[lineNo - 1] +
38
+ '\n' +
39
+ ' ' +
40
+ Array(colNo).join(' ') +
41
+ '^'
42
+
43
+ throw new Error(message)
44
+ }
45
+
46
+ function escapeRegExp(str) {
47
+ // From MDN
48
+ return str.replace(escapeRegexpRE, '\\$&') // $& means the whole matched string
49
+ }
50
+
51
+ function trimWS(str, wsLeft, wsRight) {
52
+ // Slightly confusing,
53
+ // but _}} will trim the left side of the following string
54
+ let leftTrim = wsLeft || wsLeft === false ? wsLeft : 'nl'
55
+ let rightTrim = wsRight || wsRight === false ? wsRight : false
56
+
57
+ if (!rightTrim && !leftTrim) return str
58
+
59
+ if (leftTrim === 'slurp' && rightTrim === 'slurp') {
60
+ return str.trim()
61
+ }
62
+
63
+ if (leftTrim === '_' || leftTrim === 'slurp') {
64
+ // full slurp
65
+ str = str.trimStart()
66
+ } else if (leftTrim === '-' || leftTrim === 'nl') {
67
+ // nl trim
68
+ str = str.replace(newlineTrimRE, '')
69
+ }
70
+
71
+ if (rightTrim === '_' || rightTrim === 'slurp') {
72
+ // full slurp
73
+ str = str.trimEnd()
74
+ } else if (rightTrim === '-' || rightTrim === 'nl') {
75
+ // nl trim
76
+ str = str.replace(newlineTrimRE, '')
77
+ }
78
+
79
+ return str
80
+ }
81
+
82
+ // opts: { exec, interpolate, raw, tagStart, tagEnd }
83
+ function getAST(str, opts) {
84
+ let ast = []
85
+ let trimLeftOfNextStr = false
86
+ let lastIndex = 0
87
+
88
+ templateLitReg.lastIndex = 0
89
+ singleQuoteReg.lastIndex = 0
90
+ doubleQuoteReg.lastIndex = 0
91
+
92
+ function pushString(strng, shouldTrimRightOfString) {
93
+ if (strng) {
94
+ // if string is truthy it must be of type 'string'
95
+
96
+ strng = trimWS(
97
+ strng,
98
+ trimLeftOfNextStr, // this will only be false on the first str, the next ones will be null or undefined
99
+ shouldTrimRightOfString
100
+ )
101
+
102
+ if (strng) {
103
+ // replace \ with \\, ' with \'
104
+ // we're going to convert all CRLF to LF so it doesn't take more than one replace
105
+
106
+ strng = strng.replace(/\\|'/g, '\\$&').replace(/\r\n|\n|\r/g, '\\n')
107
+
108
+ ast.push(strng)
109
+ }
110
+ }
111
+ }
112
+
113
+ const prefixes = [opts.exec, opts.interpolate, opts.raw].reduce(
114
+ (accumulator, prefix) => {
115
+ if (accumulator && prefix) {
116
+ return accumulator + '|' + escapeRegExp(prefix)
117
+ } else if (prefix) {
118
+ // accumulator is falsy
119
+ return escapeRegExp(prefix)
120
+ } else {
121
+ // prefix and accumulator are both falsy
122
+ return accumulator
123
+ }
124
+ },
125
+ ''
126
+ )
127
+
128
+ const parseOpenReg = new RegExp(
129
+ escapeRegExp(opts.tagStart) + '(-|_)?\\s*(' + prefixes + ')?\\s*',
130
+ 'g'
131
+ )
132
+
133
+ const parseCloseReg = new RegExp(
134
+ '\'|"|`|\\/\\*|(\\s*(-|_)?' + escapeRegExp(opts.tagEnd) + ')',
135
+ 'g'
136
+ )
137
+
138
+ let m
139
+
140
+ while ((m = parseOpenReg.exec(str))) {
141
+ const precedingString = str.slice(lastIndex, m.index)
142
+
143
+ lastIndex = m[0].length + m.index
144
+
145
+ const wsLeft = m[1]
146
+ const prefix = m[2] || '' // by default either ~, =, or empty
147
+
148
+ pushString(precedingString, wsLeft)
149
+
150
+ parseCloseReg.lastIndex = lastIndex
151
+ let closeTag
152
+ let currentObj = false
153
+
154
+ while ((closeTag = parseCloseReg.exec(str))) {
155
+ if (closeTag[1]) {
156
+ const content = str.slice(lastIndex, closeTag.index)
157
+
158
+ parseOpenReg.lastIndex = lastIndex = parseCloseReg.lastIndex
159
+
160
+ trimLeftOfNextStr = closeTag[2]
161
+
162
+ const currentType =
163
+ prefix === opts.exec
164
+ ? 'e'
165
+ : prefix === opts.raw
166
+ ? 'r'
167
+ : prefix === opts.interpolate
168
+ ? 'i'
169
+ : ''
170
+
171
+ currentObj = { t: currentType, val: content }
172
+ break
173
+ } else {
174
+ const char = closeTag[0]
175
+ if (char === '/*') {
176
+ const commentCloseInd = str.indexOf('*/', parseCloseReg.lastIndex)
177
+
178
+ if (commentCloseInd === -1) {
179
+ throwParseError('unclosed comment', str, closeTag.index)
180
+ }
181
+ parseCloseReg.lastIndex = commentCloseInd
182
+ } else if (char === "'") {
183
+ singleQuoteReg.lastIndex = closeTag.index
184
+
185
+ const singleQuoteMatch = singleQuoteReg.exec(str)
186
+ if (singleQuoteMatch) {
187
+ parseCloseReg.lastIndex = singleQuoteReg.lastIndex
188
+ } else {
189
+ throwParseError('unclosed string', str, closeTag.index)
190
+ }
191
+ } else if (char === '"') {
192
+ doubleQuoteReg.lastIndex = closeTag.index
193
+ const doubleQuoteMatch = doubleQuoteReg.exec(str)
194
+
195
+ if (doubleQuoteMatch) {
196
+ parseCloseReg.lastIndex = doubleQuoteReg.lastIndex
197
+ } else {
198
+ throwParseError('unclosed string', str, closeTag.index)
199
+ }
200
+ } else if (char === '`') {
201
+ templateLitReg.lastIndex = closeTag.index
202
+ const templateLitMatch = templateLitReg.exec(str)
203
+ if (templateLitMatch) {
204
+ parseCloseReg.lastIndex = templateLitReg.lastIndex
205
+ } else {
206
+ throwParseError('unclosed string', str, closeTag.index)
207
+ }
208
+ }
209
+ }
210
+ }
211
+ if (currentObj) {
212
+ ast.push(currentObj)
213
+ } else {
214
+ throwParseError('unclosed tag', str, m.index)
215
+ }
216
+ }
217
+
218
+ pushString(str.slice(lastIndex, str.length), false)
219
+ return ast
220
+ }
221
+
222
+ // opts: { varName, header }
223
+ function compileBody(ast, opts) {
224
+ let i = 0
225
+ const astLength = ast.length
226
+ let returnStr = `${opts.header}\nlet ${fnAccumulator} = '';\n`
227
+
228
+ for (; i < astLength; i++) {
229
+ const currentBlock = ast[i]
230
+
231
+ if (typeof currentBlock === 'string') {
232
+ returnStr += `${fnAccumulator}+='${currentBlock}';\n`
233
+ continue
234
+ }
235
+
236
+ const type = currentBlock.t // "r", "e", or "i"
237
+ let content = currentBlock.val || ''
238
+
239
+ if (type === 'r') {
240
+ // raw
241
+ returnStr += `${fnAccumulator}+=${content};\n`
242
+ } else if (type === 'i') {
243
+ // interpolate
244
+ returnStr += `${fnAccumulator}+=${content};\n`
245
+ } else if (type === 'e') {
246
+ // execute
247
+ returnStr += content + '\n'
248
+ }
249
+ }
250
+
251
+ return returnStr + `\nreturn ${fnAccumulator};`
252
+ }
253
+
254
+ export function compileTemplateToFile(str, rawOpts = {}) {
255
+ const opts = { ...defaultParseOptions, ...rawOpts }
256
+ const ast = getAST(str, opts)
257
+ const body = compileBody(ast, opts)
258
+ return `export default ${opts.varName} => {\n${body}\n}`
259
+ }
260
+
261
+ export function compileTemplateToFn(str, rawOpts = {}) {
262
+ const opts = { ...defaultParseOptions, ...rawOpts }
263
+ const ast = getAST(str, opts)
264
+ const body = compileBody(ast, opts)
265
+ return new Function(opts.varName, body)
266
+ }
267
+
268
+ export function renderTemplate(str, scope, rawOpts) {
269
+ let opts = rawOpts
270
+ if (opts?.varName === false) {
271
+ opts.varName = defaultParseOptions.varName
272
+ const keys = Object.keys(scope)
273
+ if (keys.length !== 0) {
274
+ opts.header = `const { ${keys.join(', ')} } = ${defaultParseOptions.varName}`
275
+ }
276
+ }
277
+
278
+ const templateFn = compileTemplateToFn(str, opts)
279
+ return templateFn(scope)
280
+ }
@@ -1,19 +0,0 @@
1
- import eslintJs from '@eslint/js'
2
- import tseslint from 'typescript-eslint'
3
-
4
- export default tseslint.config(
5
- {
6
- name: 'eslint/recommended',
7
-
8
- ...eslintJs.configs.recommended
9
- },
10
-
11
- {
12
- name: 'custom',
13
-
14
- rules: {
15
- 'no-empty': 'off',
16
- 'no-unused-vars': [ 'error', { ignoreRestSiblings: true, argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' } ]
17
- }
18
- }
19
- )
package/eslint.config.js DELETED
@@ -1,47 +0,0 @@
1
- import baseConfig from './eslint.config.base.js'
2
- import globals from 'globals'
3
- import tseslint from 'typescript-eslint'
4
- // import quasar from 'eslint-config-quasar'
5
-
6
- export default tseslint.config(
7
- ...baseConfig,
8
-
9
- // TODO: enable these configs
10
- // ...quasar.configs.base,
11
- // ...quasar.configs.node,
12
-
13
- {
14
- name: 'custom/ignores',
15
-
16
- ignores: [ 'test-project' ]
17
- },
18
-
19
- {
20
- name: 'custom',
21
-
22
- languageOptions: {
23
- ecmaVersion: 'latest',
24
- sourceType: 'module',
25
-
26
- globals: {
27
- ...globals.node
28
- }
29
- }
30
- },
31
-
32
- {
33
- name: 'custom/scripts',
34
-
35
- files: [ './scripts/**/*.ts' ],
36
-
37
- extends: [
38
- ...tseslint.configs.recommended
39
- ],
40
-
41
- languageOptions: {
42
- parserOptions: {
43
- sourceType: 'module',
44
- }
45
- }
46
- }
47
- )
@@ -1,8 +0,0 @@
1
- export async function script ({ scope, utils }) {
2
- await utils.prompts(scope, [
3
- utils.commonPrompts.scriptType
4
- ])
5
-
6
- const { script } = await import(`./quasar-v2/index.js`)
7
- await script({ scope, utils })
8
- }
@@ -1,56 +0,0 @@
1
- export async function script ({ scope, utils }) {
2
- await utils.prompts(scope, [
3
- {
4
- type: 'select',
5
- name: 'engine',
6
- message: 'Pick Quasar App CLI variant:',
7
- initial: 0,
8
- choices: [
9
- { title: 'Quasar App CLI with Vite', value: 'vite-2', description: 'recommended' },
10
- { title: 'Quasar App CLI with Webpack', value: 'webpack-4' }
11
- ]
12
- },
13
- {
14
- type: 'text',
15
- name: 'name',
16
- message: 'Package name:',
17
- initial: () => utils.inferPackageName(scope.projectFolderName),
18
- validate: (val) =>
19
- utils.isValidPackageName(val) || 'Invalid package.json name'
20
- },
21
-
22
- utils.commonPrompts.productName,
23
- utils.commonPrompts.description,
24
- ])
25
-
26
- await utils.injectAuthor(scope)
27
-
28
- await utils.prompts(scope, [
29
- {
30
- type: 'select',
31
- name: 'sfcStyle',
32
- message: 'Pick a Vue component style:',
33
- initial: 0,
34
- choices: [
35
- { title: 'Composition API with <script setup>', value: 'composition-setup', description: 'recommended' },
36
- { title: 'Composition API', value: 'composition', description: 'recommended' },
37
- { title: 'Options API', value: 'options' }
38
- ]
39
- },
40
-
41
- {
42
- type: 'select',
43
- name: 'css',
44
- message: 'Pick your CSS preprocessor:',
45
- initial: 0,
46
- choices: [
47
- { title: 'Sass with SCSS syntax', value: 'scss' },
48
- { title: 'Sass with indented syntax', value: 'sass' },
49
- { title: 'None (the others will still be available)', value: 'css' }
50
- ]
51
- }
52
- ])
53
-
54
- const { script } = await import(`./${ scope.scriptType }-${ scope.engine }/index.js`)
55
- await script({ scope, utils })
56
- }
@@ -1,24 +0,0 @@
1
- import { defineBoot } from '#q-app/wrappers'
2
- import axios from 'axios'
3
-
4
- // Be careful when using SSR for cross-request state pollution
5
- // due to creating a Singleton instance here;
6
- // If any client changes this (global) instance, it might be a
7
- // good idea to move this instance creation inside of the
8
- // "export default () => {}" function below (which runs individually
9
- // for each client)
10
- const api = axios.create({ baseURL: 'https://api.example.com' })
11
-
12
- export default defineBoot(({ app }) => {
13
- // for use inside Vue files (Options API) through this.$axios and this.$api
14
-
15
- app.config.globalProperties.$axios = axios
16
- // ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form)
17
- // so you won't necessarily have to import axios in each vue file
18
-
19
- app.config.globalProperties.$api = api
20
- // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
21
- // so you can easily perform requests against your app's API
22
- })
23
-
24
- export { api }
@@ -1 +0,0 @@
1
- // app global css in SCSS form
@@ -1,25 +0,0 @@
1
- // Quasar SCSS (& Sass) Variables
2
- // --------------------------------------------------
3
- // To customize the look and feel of this app, you can override
4
- // the Sass/SCSS variables found in Quasar's source Sass/SCSS files.
5
-
6
- // Check documentation for full list of Quasar variables
7
-
8
- // Your own variables (that are declared here) and Quasar's own
9
- // ones will be available out of the box in your .vue/.scss/.sass files
10
-
11
- // It's highly recommended to change the default colors
12
- // to match your app's branding.
13
- // Tip: Use the "Theme Builder" on Quasar's documentation website.
14
-
15
- $primary : #1976D2;
16
- $secondary : #26A69A;
17
- $accent : #9C27B0;
18
-
19
- $dark : #1D1D1D;
20
- $dark-page : #121212;
21
-
22
- $positive : #21BA45;
23
- $negative : #C10015;
24
- $info : #31CCEC;
25
- $warning : #F2C037;
@@ -1,24 +0,0 @@
1
- import { defineBoot } from '#q-app/wrappers'
2
- import axios from 'axios'
3
-
4
- // Be careful when using SSR for cross-request state pollution
5
- // due to creating a Singleton instance here;
6
- // If any client changes this (global) instance, it might be a
7
- // good idea to move this instance creation inside of the
8
- // "export default () => {}" function below (which runs individually
9
- // for each client)
10
- const api = axios.create({ baseURL: 'https://api.example.com' })
11
-
12
- export default defineBoot(({ app }) => {
13
- // for use inside Vue files (Options API) through this.$axios and this.$api
14
-
15
- app.config.globalProperties.$axios = axios
16
- // ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form)
17
- // so you won't necessarily have to import axios in each vue file
18
-
19
- app.config.globalProperties.$api = api
20
- // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
21
- // so you can easily perform requests against your app's API
22
- })
23
-
24
- export { api }
@@ -1 +0,0 @@
1
- // app global css in SCSS form
@@ -1,25 +0,0 @@
1
- // Quasar SCSS (& Sass) Variables
2
- // --------------------------------------------------
3
- // To customize the look and feel of this app, you can override
4
- // the Sass/SCSS variables found in Quasar's source Sass/SCSS files.
5
-
6
- // Check documentation for full list of Quasar variables
7
-
8
- // Your own variables (that are declared here) and Quasar's own
9
- // ones will be available out of the box in your .vue/.scss/.sass files
10
-
11
- // It's highly recommended to change the default colors
12
- // to match your app's branding.
13
- // Tip: Use the "Theme Builder" on Quasar's documentation website.
14
-
15
- $primary : #1976D2;
16
- $secondary : #26A69A;
17
- $accent : #9C27B0;
18
-
19
- $dark : #1D1D1D;
20
- $dark-page : #121212;
21
-
22
- $positive : #21BA45;
23
- $negative : #C10015;
24
- $info : #31CCEC;
25
- $warning : #F2C037;
@@ -1,31 +0,0 @@
1
- import { defineBoot } from '#q-app/wrappers';
2
- import axios, { type AxiosInstance } from 'axios';
3
-
4
- declare module 'vue' {
5
- interface ComponentCustomProperties {
6
- $axios: AxiosInstance;
7
- $api: AxiosInstance;
8
- }
9
- }
10
-
11
- // Be careful when using SSR for cross-request state pollution
12
- // due to creating a Singleton instance here;
13
- // If any client changes this (global) instance, it might be a
14
- // good idea to move this instance creation inside of the
15
- // "export default () => {}" function below (which runs individually
16
- // for each client)
17
- const api = axios.create({ baseURL: 'https://api.example.com' });
18
-
19
- export default defineBoot(({ app }) => {
20
- // for use inside Vue files (Options API) through this.$axios and this.$api
21
-
22
- app.config.globalProperties.$axios = axios;
23
- // ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form)
24
- // so you won't necessarily have to import axios in each vue file
25
-
26
- app.config.globalProperties.$api = api;
27
- // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
28
- // so you can easily perform requests against your app's API
29
- });
30
-
31
- export { api };
@@ -1 +0,0 @@
1
- // app global css in SCSS form
@@ -1,25 +0,0 @@
1
- // Quasar SCSS (& Sass) Variables
2
- // --------------------------------------------------
3
- // To customize the look and feel of this app, you can override
4
- // the Sass/SCSS variables found in Quasar's source Sass/SCSS files.
5
-
6
- // Check documentation for full list of Quasar variables
7
-
8
- // Your own variables (that are declared here) and Quasar's own
9
- // ones will be available out of the box in your .vue/.scss/.sass files
10
-
11
- // It's highly recommended to change the default colors
12
- // to match your app's branding.
13
- // Tip: Use the "Theme Builder" on Quasar's documentation website.
14
-
15
- $primary : #1976D2;
16
- $secondary : #26A69A;
17
- $accent : #9C27B0;
18
-
19
- $dark : #1D1D1D;
20
- $dark-page : #121212;
21
-
22
- $positive : #21BA45;
23
- $negative : #C10015;
24
- $info : #31CCEC;
25
- $warning : #F2C037;
@@ -1,31 +0,0 @@
1
- import { defineBoot } from '#q-app/wrappers';
2
- import axios, { type AxiosInstance } from 'axios';
3
-
4
- declare module 'vue' {
5
- interface ComponentCustomProperties {
6
- $axios: AxiosInstance;
7
- $api: AxiosInstance;
8
- }
9
- }
10
-
11
- // Be careful when using SSR for cross-request state pollution
12
- // due to creating a Singleton instance here;
13
- // If any client changes this (global) instance, it might be a
14
- // good idea to move this instance creation inside of the
15
- // "export default () => {}" function below (which runs individually
16
- // for each client)
17
- const api = axios.create({ baseURL: 'https://api.example.com' });
18
-
19
- export default defineBoot(({ app }) => {
20
- // for use inside Vue files (Options API) through this.$axios and this.$api
21
-
22
- app.config.globalProperties.$axios = axios;
23
- // ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form)
24
- // so you won't necessarily have to import axios in each vue file
25
-
26
- app.config.globalProperties.$api = api;
27
- // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
28
- // so you can easily perform requests against your app's API
29
- });
30
-
31
- export { api };
@@ -1 +0,0 @@
1
- // app global css in SCSS form
@@ -1,25 +0,0 @@
1
- // Quasar SCSS (& Sass) Variables
2
- // --------------------------------------------------
3
- // To customize the look and feel of this app, you can override
4
- // the Sass/SCSS variables found in Quasar's source Sass/SCSS files.
5
-
6
- // Check documentation for full list of Quasar variables
7
-
8
- // Your own variables (that are declared here) and Quasar's own
9
- // ones will be available out of the box in your .vue/.scss/.sass files
10
-
11
- // It's highly recommended to change the default colors
12
- // to match your app's branding.
13
- // Tip: Use the "Theme Builder" on Quasar's documentation website.
14
-
15
- $primary : #1976D2;
16
- $secondary : #26A69A;
17
- $accent : #9C27B0;
18
-
19
- $dark : #1D1D1D;
20
- $dark-page : #121212;
21
-
22
- $positive : #21BA45;
23
- $negative : #C10015;
24
- $info : #31CCEC;
25
- $warning : #F2C037;
@@ -1,15 +0,0 @@
1
- export async function script ({ scope, utils }) {
2
- /**
3
- * Temporarily disable scriptType prompt (TS not ready yet)
4
- */
5
-
6
- // await utils.prompts(scope, [
7
- // utils.commonPrompts.scriptType
8
- // ])
9
-
10
- // const { script } = await import(`./ae-${ scope.scriptType }/index.js`)
11
- // await script({ scope, utils })
12
-
13
- const { script } = await import('./ae-js/index.js')
14
- await script({ scope, utils })
15
- }