包详细信息

nuxt-component-meta

nuxtlabs130.7kMIT0.11.0

[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href]

vue, nuxt, vue component, nuxt component

自述文件

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 for Nuxt Studio.

Quick Setup

  1. Add nuxt-component-meta dependency to your project:
# Using PNPM
pnpm add nuxt-component-meta

# Using NPM
npm install nuxt-component-meta
  1. Add nuxt-component-meta to the modules section of your nuxt.config.ts
export default defineNuxtConfig({
  modules: ['nuxt-component-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 nuxt-component-meta@nightly

Development

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

License

MIT License

Copyright (c) NuxtLabs

更新日志

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.3.7 (2022-12-06)

Features

  • content: remove rest in content transformer (4a3d063)

0.3.6 (2022-12-06)

Bug Fixes

  • module: update transformers (2f57524)

0.3.5 (2022-11-27)

Features

  • transformers: improve transformers feature ; add @nuxt/content support by default (93d176c)

0.3.4 (2022-11-16)

0.3.3 (2022-11-01)

Features

  • unplugin: move parsing steps to unplugin (#43) (ae5ae18)

Bug Fixes

  • hmr: fix hmr; avoid relying on transformers (75e192b)

0.2.3 (2022-09-20)

0.2.2 (2022-08-31)

Bug Fixes

  • add tsconfig path to vue-component-meta (#40) (a32212b)

0.2.1 (2022-08-29)

Bug Fixes

0.2.0 (2022-08-29)

⚠ BREAKING CHANGES

  • use vue-component-meta (#34)

Features

Bug Fixes

0.1.9 (2022-07-21)

Features

Bug Fixes

0.1.8 (2022-07-20)

Features

  • detect ts as expression and Vue's PropType (4d2388d)

Bug Fixes

  • check for object properties (0f20817)

0.1.7 (2022-07-19)

Bug Fixes

  • prevent undefined error (5a403f4)

0.1.6 (2022-07-19)

Features

  • add flag for global components (#27) (6e70ad3)
  • basic support for typescript defineProps (#25) (60cfbaf)
  • detect $slots usages in template (#26) (ec35351)
  • extract props info from defineProps (#21) (8f89275)

0.1.5 (2022-05-11)

Bug Fixes

  • api: fix single component query (5f967c5)
  • lint: fix linting (237b16f)
  • use addServerHandler and correct method (3d247cc)

0.1.2 (2022-04-19)

0.1.0 (2022-04-15)

Features

0.0.7 (2021-11-22)

Bug Fixes

0.0.6 (2021-11-22)

Bug Fixes

  • resolve components path (9b071d3)

0.0.5 (2021-11-16)

Features

0.0.4 (2021-11-09)

Bug Fixes

0.0.3 (2021-10-13)

Bug Fixes

0.0.2 (2021-10-13)

Bug Fixes

  • rename props key to name (8781217)

0.0.1 (2021-10-13)

Features

  • provide slots, required, value and description meta (81b2a5c)