create-quasar 1.0.30 → 1.0.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-quasar",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Scaffolds Quasar Apps, AppExtensions or UI kits",
5
5
  "author": {
6
6
  "name": "Razvan Stoenescu",
@@ -14,7 +14,7 @@
14
14
  "dependencies": {
15
15
  <% if (typescriptConfig === 'class') { %>"vue-class-component": "^8.0.0-rc.1",<% } %>
16
16
  <% if (preset.axios) { %>"axios": "^0.21.1",<% } %>
17
- <% if (preset.i18n) { %>"vue-i18n": "^9.0.0",<% } %>
17
+ <% if (preset.i18n) { %>"vue-i18n": "^9.2.2",<% } %>
18
18
  <% if (preset.pinia) { %>"pinia": "^2.0.11",<% } %>
19
19
  <% if (preset.vuex) { %>"vuex": "^4.0.1",<% } %>
20
20
  "@quasar/extras": "^1.0.0",
@@ -3,10 +3,28 @@ import { createI18n } from 'vue-i18n';
3
3
 
4
4
  import messages from 'src/i18n';
5
5
 
6
+ export type MessageLanguages = keyof typeof messages;
7
+ // Type-define 'en-US' as the master schema for the resource
8
+ export type MessageSchema = typeof messages["en-US"];
9
+
10
+ // See https://vue-i18n.intlify.dev/guide/advanced/typescript.html#global-resource-schema-type-definition
11
+ /* eslint-disable @typescript-eslint/no-empty-interface */
12
+ declare module "vue-i18n" {
13
+ // define the locale messages schema
14
+ export interface DefineLocaleMessage extends MessageSchema {}
15
+
16
+ // define the datetime format schema
17
+ export interface DefineDateTimeFormat {}
18
+
19
+ // define the number format schema
20
+ export interface DefineNumberFormat {}
21
+ }
22
+ /* eslint-enable @typescript-eslint/no-empty-interface */
23
+
6
24
  export default boot(({ app }) => {
7
25
  const i18n = createI18n({
8
- locale: 'en-US',
9
- globalInjection: true,
26
+ locale: 'en-US',<% if (typescriptConfig === 'composition' || typescriptConfig === 'composition-setup') { %>
27
+ legacy: false,<% } %>
10
28
  messages,
11
29
  });
12
30
 
@@ -14,7 +14,7 @@
14
14
  "dependencies": {
15
15
  <% if (typescriptConfig === 'class') { %>"vue-class-component": "^8.0.0-rc.1",<% } %>
16
16
  <% if (preset.axios) { %>"axios": "^0.21.1",<% } %>
17
- <% if (preset.i18n) { %>"vue-i18n": "^9.0.0",<% } %>
17
+ <% if (preset.i18n) { %>"vue-i18n": "^9.2.2",<% } %>
18
18
  <% if (preset.pinia) { %>"pinia": "^2.0.11",<% } %>
19
19
  <% if (preset.vuex) { %>"vuex": "^4.0.1",<% } %>
20
20
  "@quasar/extras": "^1.0.0",
@@ -3,10 +3,28 @@ import { createI18n } from 'vue-i18n';
3
3
 
4
4
  import messages from 'src/i18n';
5
5
 
6
+ export type MessageLanguages = keyof typeof messages;
7
+ // Type-define 'en-US' as the master schema for the resource
8
+ export type MessageSchema = typeof messages["en-US"];
9
+
10
+ // See https://vue-i18n.intlify.dev/guide/advanced/typescript.html#global-resource-schema-type-definition
11
+ /* eslint-disable @typescript-eslint/no-empty-interface */
12
+ declare module "vue-i18n" {
13
+ // define the locale messages schema
14
+ export interface DefineLocaleMessage extends MessageSchema {}
15
+
16
+ // define the datetime format schema
17
+ export interface DefineDateTimeFormat {}
18
+
19
+ // define the number format schema
20
+ export interface DefineNumberFormat {}
21
+ }
22
+ /* eslint-enable @typescript-eslint/no-empty-interface */
23
+
6
24
  export default boot(({ app }) => {
7
- const i18n = createI18n({
8
- locale: 'en-US',
9
- globalInjection: true,
25
+ const i18n = createI18n<{ message: MessageSchema }, MessageLanguages>({
26
+ locale: 'en-US',<% if (typescriptConfig === 'composition' || typescriptConfig === 'composition-setup') { %>
27
+ legacy: false,<% } %>
10
28
  messages,
11
29
  });
12
30
 
package/utils/index.js CHANGED
@@ -59,8 +59,8 @@ module.exports.renderTemplate = function (templateDir, scope) {
59
59
  const targetRelativePath = rawPath.split('/').map(name => {
60
60
  // dotfiles are ignored when published to npm, therefore in templates
61
61
  // we need to prefix them with an underscore (e.g. "_.gitignore")
62
- // Also, some tools like ESLint excepts valid config files, therefore
63
- // we also prefix files like "package.json" too. (e.g. "_.package.json")
62
+ // Also, some tools like ESLint expect valid config files, therefore
63
+ // we also prefix files like "package.json" too. (e.g. "_package.json")
64
64
  return name.startsWith('_')
65
65
  ? name.slice(1)
66
66
  : name