All Projects → propellant → Doctor

propellant / Doctor

Licence: mit
quick and easy documentation of Vue.js components - DEPRECATED

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Doctor

Redemo
react demo component
Stars: ✭ 60 (-73.57%)
Mutual labels:  documentation, component
React Fontawesome
A React Font Awesome component.
Stars: ✭ 662 (+191.63%)
Mutual labels:  props, component
Entitycomponentsystemsamples
No description or website provided.
Stars: ✭ 4,218 (+1758.15%)
Mutual labels:  documentation, component
Cypress React Selector
⚡️ cypress plugin to locate react elements by component, props and state
Stars: ✭ 121 (-46.7%)
Mutual labels:  props, component
Hexo Theme Doc
A documentation theme for the Hexo blog framework
Stars: ✭ 222 (-2.2%)
Mutual labels:  documentation
V Bar
The virtual responsive crossbrowser scrollbar component for VueJS 2x
Stars: ✭ 216 (-4.85%)
Mutual labels:  component
Yoshino
A themable React component library!Flexible Lightweight PC UI Components built on React! Anyone can generate easily all kinds of themes by it!
Stars: ✭ 216 (-4.85%)
Mutual labels:  component
Marlindocumentation
Marlin Firmware Documentation Project
Stars: ✭ 215 (-5.29%)
Mutual labels:  documentation
Vue Glide
A slider and carousel as vue component on top of the Glide.js
Stars: ✭ 225 (-0.88%)
Mutual labels:  component
Openapi Codegen
OpenAPI 3.0 CodeGen plus Node.js minus the Java and emojis
Stars: ✭ 224 (-1.32%)
Mutual labels:  documentation
React Messenger Customer Chat
React component for messenger customer chat plugin
Stars: ✭ 221 (-2.64%)
Mutual labels:  component
Mvvmframe
🏰 MVVMFrame for Android 是一个基于Google官方推出的Architecture Components dependencies(现在叫JetPack){ Lifecycle,LiveData,ViewModel,Room } 构建的快速开发框架。有了MVVMFrame的加持,从此构建一个MVVM模式的项目变得快捷简单。
Stars: ✭ 218 (-3.96%)
Mutual labels:  component
Emu Docs
Emulator documentation archive
Stars: ✭ 222 (-2.2%)
Mutual labels:  documentation
Vue Tinymce Editor
This a component provides use of tinymce for vue developers
Stars: ✭ 216 (-4.85%)
Mutual labels:  component
Router
Angular Component Router - A declarative router for Angular applications
Stars: ✭ 225 (-0.88%)
Mutual labels:  component
Awesome React Native Web
💙 React Native Web patterns, techniques, tips, and tricks ✨
Stars: ✭ 215 (-5.29%)
Mutual labels:  documentation
Mindforger Repository
MindForger documentation repository.
Stars: ✭ 221 (-2.64%)
Mutual labels:  documentation
React Native Skeleton Content
A customizable skeleton-like loading placeholder for react native projects using expo.
Stars: ✭ 221 (-2.64%)
Mutual labels:  component
Vue Dynamic Form Component
Vue dynamic nested form component, support nested Object/Hashmap/Array. Vue动态多级表单组件,支持嵌套对象/Hashmap/数组。
Stars: ✭ 220 (-3.08%)
Mutual labels:  component
Swiftdoc.org
Auto-generated documentation for Swift. Command-click no more.
Stars: ✭ 219 (-3.52%)
Mutual labels:  documentation

propdoc Build Status

quick and easy documentation of Vue.js components

installation

npm install --save propdoc

example output

This example was solely generated based on the extra fields described below.

screenshot

features

propdoc proposes a new way of documenting Vue components, by including some (or all) of the documentation in the component itself.

Benefits:

  • props can be directly annotated, making documentation essentially the same as commenting a prop
  • Documentation can live directly in the component - thus centralizing the documentation and hopefully helping the development/documentation cycle

Downsides:

  • If all documentation is built into the options object, the component will use additional space
    • This can be mitigated by externalizing the larger proposed keys such as description and token

new keys for your components

This example showcases all of what propdoc would parse, however, none are required to be used and will not be output if absent.

export default {
  name: 'checkbox',
  introduction: 'an amazing checkbox',
  description: `
  This \`checkbox\` is amazing, you should _check_ it out.
  `,
  token: "<checkbox label='foo'></checkbox>",
  props: {
    label: {
      type: String,
      default: '',
      note: "a label to be appended after the checkbox"
    }
  }
}

note

note is used alongside expanded (object-style) props to describe that prop in more detail

introduction

a brief summary of what the component is or does

description

a more in-depth documentation of the component, will be parsed using Markdown. Note that code will need to be escaped if it's inside of a Javascript string literal.

token

a quick example of the component's actual use, great for providing a way to quickly copy/paste in the future

use in your documentation

<script>
import propDoc from 'propdoc'
import myComponent from './myComponent.vue'

export default {
  components: { propDoc },
  // bind your component to use propdoc's native template output
  data() {
    return { documentMe: myComponent }
  },
  // or call getDoc() and use the same data in your own template
  computed: {
    myComponentDoc() { return propDoc.getDoc(myComponent) }
  }
}
</script>

<template>
  <section>
    <prop-doc :component="documentMe"></prop-doc>
    <div>
      <h1>{{ myComponentDoc.name }}</h1>
      <p>{{ myComponentDoc.introduction }}</p>
    </div>
  </section>
</template>

props

  • component: required and should be the component object itself
  • documentation: optional, can be any subset of component, and will take precedence; useful for two functions
    • if the component's name or other fields should be output differently for documentation
    • for the optional documentation fields, as these will cause some additional space to be used by your components if not separated

slots

Two named slots are available for adding content to what propdoc emits

  • pre-use will add content before the description and token fields
  • pre-props will add content before the prop tables are emitted

propDoc.getDoc

available in v0.8 onward

propDoc.getDoc(component, documentation)

  • merges the arguments passed to it, then processes them as described above in keys
  • the props object will be converted into an array instead of an object to simplify parsing in your template
    • essentially this means you can do v-for="prop in myDocumentedComponent.props" and then prop.name instead of having to separate out the key/value
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].