File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 6565 " feature-flags" ,
6666 " format.ts" ,
6767 " git" ,
68- " git-blame-ignore" ,
68+ " git-blame-ignore" ,
69+ " git-version" ,
6970 " healthz" ,
7071 " i18n" ,
7172 " logger" ,
8283 " useStripeProvider" ,
8384 " useWindowSize" ,
8485 " variables.scss" ,
85- " vscode"
86+ " vscode"
8687 ],
8788 "editor.codeActionsOnSave" : {
8889 "source.fixAll.eslint" : " always"
Original file line number Diff line number Diff line change 1+ declare global {
2+ interface Window {
3+ gitVersion : string ,
4+ }
5+ }
6+
7+ export default defineNuxtPlugin ( {
8+ hooks : {
9+ 'app:mounted' ( ) {
10+ window . gitVersion = useRuntimeConfig ( ) . public . gitVersion
11+ } ,
12+ } ,
13+ name : 'git-version' ,
14+ setup ( ) {
15+ const { gitVersion } = useRuntimeConfig ( ) . public
16+ useHead ( {
17+ htmlAttrs : {
18+ 'data-git-version' : gitVersion ,
19+ } ,
20+ } )
21+ } ,
22+ } )
You can’t perform that action at this time.
0 commit comments