Widget for nuxt to display git info build
Add package yarn add @dewib/git-widget
Add the module to the modules
of your nuxt.config.js
export default {
modules: ['@dewib/git-widget']
}
export default {
gitWidget: {
html: true, // Display tooltip (default: true)
disabled: false // ex: disabled for production (default: false)
}
}
This module inject a plugin that expose the $dewib.gitWidget.hash
hash and $dewib.gitWidget.url
url inside Nuxt context.
<template>
<a :href="$dewib.gitWidget.url" target="_blank">Build hash: {{ $dewib.gitWidget.hash.short }}</a>
</template>