Skip to content

Commit

Permalink
Add vintl global var in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
brawaru committed Nov 23, 2023
1 parent 4730143 commit 512b801
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions apps/docs/plugins/global-vintl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export default defineNuxtPlugin((nuxtApp) => {
if (process.client && typeof window !== null) {

Check failure on line 2 in apps/docs/plugins/global-vintl.ts

View workflow job for this annotation

GitHub Actions / release

Invalid typeof comparison value
;(window as any).vintl = nuxtApp.$i18n

Check failure on line 3 in apps/docs/plugins/global-vintl.ts

View workflow job for this annotation

GitHub Actions / release

Unnecessary semicolon
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))
}
})

0 comments on commit 512b801

Please sign in to comment.