mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 21:26:40 +00:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92c90127b8 | ||
|
|
5786f3c0d4 | ||
|
|
6f57e4a704 | ||
|
|
95fdfbb51d | ||
|
|
ce471bc4e3 | ||
|
|
39fd25bda6 | ||
|
|
512b80184b | ||
|
|
473014349b | ||
|
|
114d04ac77 | ||
|
|
a08c222774 | ||
|
|
08cfcebded |
@@ -1,5 +1,5 @@
|
||||
export default defineNuxtConfig({
|
||||
extends: '@nuxt-themes/docus',
|
||||
extends: ['@nuxt-themes/docus'],
|
||||
modules: ['@vintl/nuxt'],
|
||||
vintl: {
|
||||
defaultLocale: 'en-US',
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
"start": "node .output/server/index.mjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@formatjs/cli": "^6.2.1",
|
||||
"@formatjs/cli": "^6.2.4",
|
||||
"@nuxt-themes/docus": "^1.15.0",
|
||||
"@nuxt/eslint-config": "^0.2.0",
|
||||
"@vintl-dev/eslint-config-peony": "workspace:^",
|
||||
"@vintl/nuxt": "workspace:^",
|
||||
"eslint": "^8.52.0",
|
||||
"eslint": "^8.54.0",
|
||||
"nuxi": "^3.9.1",
|
||||
"nuxt": "^3.8.0",
|
||||
"theme-colors": "^0.0.5",
|
||||
"vue": "^3.3.7"
|
||||
"nuxt": "^3.8.1",
|
||||
"theme-colors": "^0.1.0",
|
||||
"vue": "^3.3.8"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
if (process.client && typeof window !== 'undefined') {
|
||||
Object.defineProperty(window, 'vintl', {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
enumerable: true,
|
||||
value: nuxtApp.$i18n,
|
||||
})
|
||||
console.log('~'.repeat(80))
|
||||
console.log('%cHey there! 👋', 'font-size: 1.2rem')
|
||||
console.log(
|
||||
'VIntl controller can be used here through a global `vintl` variable.',
|
||||
)
|
||||
console.log(
|
||||
'Have playing with it! And if you break anything, just refresh the page :P',
|
||||
)
|
||||
if (!process.dev) {
|
||||
console.log(
|
||||
'⚠️ This is a production environment. Message parsing is unavailable.',
|
||||
)
|
||||
}
|
||||
console.log('~'.repeat(80))
|
||||
}
|
||||
})
|
||||
@@ -41,4 +41,17 @@ export default defineNuxtConfig({
|
||||
},
|
||||
onParseError: 'log-and-skip',
|
||||
},
|
||||
typescript: {
|
||||
tsConfig: {
|
||||
compilerOptions: {
|
||||
moduleResolution: 'bundler',
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
src: './plugins/test.ts',
|
||||
order: -100,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
"@vintl-dev/eslint-config-peony": "workspace:^",
|
||||
"@vintl-dev/pg-messages": "workspace:^",
|
||||
"@vintl/nuxt": "workspace:^",
|
||||
"eslint": "^8.52.0",
|
||||
"eslint": "^8.54.0",
|
||||
"nuxi": "^3.9.1",
|
||||
"nuxt": "^3.8.0"
|
||||
"nuxt": "^3.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
nuxtApp.hook('i18n:extendLocale', ({ event }) => {
|
||||
console.log('[vintl] loading locale', event.locale.tag)
|
||||
})
|
||||
|
||||
nuxtApp.hook('i18n:ready', () => {
|
||||
console.log('[vintl] ready')
|
||||
})
|
||||
})
|
||||
+1
-1
@@ -36,5 +36,5 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"packageManager": "pnpm@8.9.2"
|
||||
"packageManager": "pnpm@8.10.5"
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@rushstack/eslint-patch": "^1.5.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
||||
"@typescript-eslint/parser": "^6.9.0",
|
||||
"eslint-plugin-vue": "^9.18.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-plugin-vue": "^9.18.1",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/eslint": "^8.44.6",
|
||||
"eslint": "^8.52.0"
|
||||
"@types/eslint": "^8.44.7",
|
||||
"eslint": "^8.54.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vintl/nuxt
|
||||
|
||||
## 1.8.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 114d04a: Switched to a slightly more compatible `#app` augmentation
|
||||
|
||||
## 1.8.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vintl/nuxt",
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.1",
|
||||
"description": "Nuxt Module for VIntl integration",
|
||||
"keywords": [
|
||||
"i18n",
|
||||
@@ -39,11 +39,11 @@
|
||||
"prepack": "pnpm run -s lint && pnpm run -s build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/module-builder": "^0.5.2",
|
||||
"@nuxt/schema": "^3.8.0",
|
||||
"@types/hash-sum": "^1.0.1",
|
||||
"@types/node": "^18.18.7",
|
||||
"@unhead/vue": "^1.7.4",
|
||||
"@nuxt/module-builder": "^0.5.4",
|
||||
"@nuxt/schema": "^3.8.1",
|
||||
"@types/hash-sum": "^1.0.2",
|
||||
"@types/node": "^18.18.10",
|
||||
"@unhead/vue": "^1.8.4",
|
||||
"@vintl-dev/eslint-config-peony": "workspace:^",
|
||||
"hookable": "^5.5.3",
|
||||
"prettier-plugin-jsdoc": "^1.1.1",
|
||||
@@ -51,19 +51,19 @@
|
||||
"vue-router": "^4.2.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@formatjs/intl": "^2.9.5",
|
||||
"@formatjs/intl-localematcher": "^0.4.2",
|
||||
"@nuxt/kit": "^3.8.0",
|
||||
"@formatjs/intl": "^2.9.9",
|
||||
"@formatjs/intl-localematcher": "^0.5.2",
|
||||
"@nuxt/kit": "^3.8.1",
|
||||
"@vintl/unplugin": "^1.5.1",
|
||||
"@vintl/vintl": "^4.4.1",
|
||||
"astring": "^1.8.6",
|
||||
"consola": "^3.2.3",
|
||||
"hash-sum": "^2.0.0",
|
||||
"import-meta-resolve": "^3.0.0",
|
||||
"import-meta-resolve": "^3.1.1",
|
||||
"pathe": "^1.1.1",
|
||||
"picocolors": "^1.0.0",
|
||||
"slash": "^5.1.0",
|
||||
"ufo": "^1.3.1",
|
||||
"ufo": "^1.3.2",
|
||||
"zod": "^3.21.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ type EventContext<E> = {
|
||||
controller: IntlController<MessageValueType>
|
||||
}
|
||||
|
||||
declare module 'nuxt/app' {
|
||||
declare module '#app' {
|
||||
interface NuxtApp
|
||||
extends InjectedProperties<VueIntlController.MessageValueTypes> {}
|
||||
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export * from 'nuxt/app'
|
||||
@@ -10,7 +10,8 @@
|
||||
|
||||
"outDir": "./dist",
|
||||
"paths": {
|
||||
"#imports": ["./stubs/imports.js"]
|
||||
"#imports": ["./stubs/imports.js"],
|
||||
"#app": ["./stubs/app.js"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
|
||||
Generated
+1808
-1047
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user