@intlify/vue-i18n-bridge
Advanced tools
Comparing version 0.4.0 to 0.5.0-146f2af
@@ -197,6 +197,11 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
declare class VueI18nLegacy { | ||
static install() | ||
static version | ||
} | ||
export * from 'vue-i18n' | ||
export { VueI18n, isVueI18n8, isVueI18n9 } | ||
export default VueI18n | ||
export { isVueI18n8, isVueI18n9 } | ||
export default VueI18nLegacy | ||
/* eslint-enable @typescript-eslint/no-explicit-any */ |
@@ -197,6 +197,11 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
declare class VueI18nLegacy { | ||
static install() | ||
static version | ||
} | ||
export * from 'vue-i18n' | ||
export { VueI18n, isVueI18n8, isVueI18n9 } | ||
export default VueI18n | ||
export { isVueI18n8, isVueI18n9 } | ||
export default VueI18nLegacy | ||
/* eslint-enable @typescript-eslint/no-explicit-any */ |
{ | ||
"name": "@intlify/vue-i18n-bridge", | ||
"version": "0.4.0", | ||
"version": "0.5.0-146f2af", | ||
"description": "Vue I18n bridging for Vue 2 & Vue 3", | ||
"scripts": { | ||
"postinstall": "node ./scripts/postinstall.js" | ||
}, | ||
"peerDependencies": { | ||
"@vue/composition-api": "^1.0.0-rc.1", | ||
"vue-i18n": "^8.26.1 || ^9.2.0-beta.25" | ||
"vue-i18n": "^8.26.1 || ^9.2.0-beta.25", | ||
"vue-i18n-bridge": "^9.2.0-beta.25" | ||
}, | ||
@@ -18,2 +16,5 @@ "peerDependenciesMeta": { | ||
"optional": true | ||
}, | ||
"vue-i18n-bridge": { | ||
"optional": true | ||
} | ||
@@ -58,2 +59,3 @@ }, | ||
}, | ||
"funding": "https://github.com/sponsors/kazupon", | ||
"homepage": "https://github.com/intlify/bridging/tree/main/packages/vue-i18n-bridge#readme", | ||
@@ -73,3 +75,6 @@ "repository": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"postinstall": "node ./scripts/postinstall.js" | ||
} | ||
} | ||
} |
@@ -8,5 +8,7 @@ # @intlify/vue-i18n-bridge | ||
## đ Features | ||
- Vue I18n composable APIs available on Vue 2 & Vue 3 (e.g `createI18n`, `useI18n`) | ||
- Auto detect Vue I18n version on bundling | ||
- Manual switch versions | ||
## đŋ Installation | ||
@@ -64,3 +66,3 @@ | ||
exclude: ['@intlify/vue-i18n-bridge'] | ||
} | ||
} | ||
}) | ||
@@ -88,2 +90,3 @@ ``` | ||
To explicitly switch the redirecting version, you can use these commands in your project's root: | ||
### đ¤ Manually Switch Versions | ||
@@ -106,2 +109,3 @@ | ||
``` | ||
### 𩹠Auto Fix | ||
@@ -114,2 +118,3 @@ | ||
``` | ||
### âŗī¸ Isomorphic Testings | ||
@@ -148,3 +153,9 @@ | ||
## đ Examples | ||
- [Vue 2 + Vue I18n v8](../../examples/vue-i18n-v8-vue2) | ||
- [Vue 3 + Vue I18n v9](../../examples/vue-i18n-v9-vue3) | ||
## đ Thanks | ||
This package idea was inspired from [vue-demi](https://github.com/vueuse/vue-demi), [@antfu](https://github.com/antfu)'s great work! | ||
@@ -151,0 +162,0 @@ |
@@ -1,3 +0,4 @@ | ||
const { switchVersion, loadModule, warn } = require('./utils') // eslint-disable-line @typescript-eslint/no-var-requires | ||
const { switchVersion, loadModule, warn, log } = require('./utils') // eslint-disable-line @typescript-eslint/no-var-requires | ||
log('start vue-i18n-bridge postinstall script') | ||
const VueI18n = loadModule('vue-i18n/package.json') | ||
@@ -4,0 +5,0 @@ |
@@ -54,3 +54,3 @@ const fs = require('fs') // eslint-disable-line @typescript-eslint/no-var-requires | ||
if (!i18n) { | ||
warn('Vue I18n plugin is not found. Please run "npm install vue-i18n" to install.') | ||
warn(`Vue I18n plugin is not found. Please run "npm install ${pkg}" to install.`) | ||
return false | ||
@@ -57,0 +57,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
26201
540
160
3