@nasontech/nuxt-app-version
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Update Available

npm version npm downloads License Nuxt

Get app version.

Features

Get your Nuxt app version.

Quick Setup

Install the module to your Nuxt application with one command:

npx nuxi module add @nasontech/nuxt-app-version

That's it! You can now use useAppVersion() in your Nitro server app ✨

Create an api route to return the app version.

export default defineEventHandler(() => {
    return useAppVersion()
})

Get the app version in your frontend.

<script setup lang="ts">
const { data: version } = await useFetch('/api/version')
</script>

<template>
    <div>
        <pre>Version: {{ version }}</pre>
    </div>
</template>

Contribution

Local development
# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release

Readme

Keywords

none

Package Sidebar

Install

npm i @nasontech/nuxt-app-version

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

8.06 kB

Total Files

9

Last publish

Collaborators

  • bnason