@kong-ui-public/i18n 0.4.0 → 0.4.2-pr.195.bf4c7f7.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 (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +2 -3
package/README.md CHANGED
@@ -37,7 +37,7 @@ import { createI18n, Translation } from '@kong-ui-public/i18n'
37
37
  import english from './locales/en.json'
38
38
 
39
39
  const i18n = createI18n<typeof english>('en-us', english, true)
40
- app.use(Translation, { i18n })
40
+ app.use(Translation.install<typeof english>, { i18n })
41
41
 
42
42
  // composables/index.ts
43
43
  import { useI18n } from '@kong-ui-public/i18n'
@@ -61,7 +61,7 @@ import english from './locales/en.json'
61
61
 
62
62
  const i18n = createI18n<typeof english>('en-us', english, true)
63
63
  const app = createApp(App)
64
- app.use(Translation, { i18n })
64
+ app.use(Translation.install<typeof english>, { i18n })
65
65
 
66
66
  app.mount('#app')
67
67
  ```
@@ -236,7 +236,7 @@ import english from './locales/en.json'
236
236
  //this will create Application instance of Intl object
237
237
  const i18n = createI18n<typeof english>('en-us', english, true)
238
238
  // this will register <i18n-t> component
239
- app.use(Translation, { i18n })
239
+ app.use(Translation.install<typeof english>, { i18n })
240
240
  ```
241
241
 
242
242
  And then, anywhere in application code where `i18n` is needed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/i18n",
3
- "version": "0.4.0",
3
+ "version": "0.4.2-pr.195.bf4c7f7.0",
4
4
  "type": "module",
5
5
  "main": "./dist/i18n.umd.js",
6
6
  "module": "./dist/i18n.es.js",
@@ -44,9 +44,8 @@
44
44
  "scripts": {
45
45
  "dev": "cross-env USE_SANDBOX=true vite",
46
46
  "build": "run-s typecheck build:package build:types",
47
- "build:package": "vite build",
47
+ "build:package": "BUILD_VISUALIZER='core/i18n' vite build -m production",
48
48
  "build:types": "vue-tsc -p './tsconfig.build.json' --emitDeclarationOnly",
49
- "build:visualize": "BUILD_VISUALIZER='core/i18n' vite build -m production",
50
49
  "preview:package": "vite preview --port 4173",
51
50
  "preview": "cross-env USE_SANDBOX=true PREVIEW_SANDBOX=true run-s build:package preview:package",
52
51
  "lint": "eslint '**/*.{js,jsx,ts,tsx,vue}' --ignore-path '../../../.eslintignore'",