1.0.0 • Published 11 months ago

@sse-ui/nu-meta v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Nuxt Component Meta

npm version npm downloads

Gather components metadata on build time and make them available on production. This module is developed to give a visual Markdown Editor with Vue Components in it.

Quick Setup

  1. Add @sse-ui/nu-meta dependency to your project:
# Using PNPM
pnpm add @sse-ui/nu-meta

# Using NPM
npm install @sse-ui/nu-meta
  1. Add @sse-ui/nu-meta to the modules section of your nuxt.config.ts
export default defineNuxtConfig({
  modules: ["@sse-ui/nu-meta"],
});

Usage

<template>
  <div>
    <h2>`MyComponent` metadata</h2>
    <pre>
      {{ meta }}
    </pre>
  </div>
</template>

<script script>
  const { data: meta } = await useAsyncData('my-component', () => $fetch('/api/component-meta/my-component'))
</script>

Nightly Builds

You can install the latest nightly build of the Studio module by running:

npm i @sse-ui/nu-meta

Development

  1. Clone this repository
  2. Install dependencies using pnpm install
  3. Start dev server using pnpm dev