All Projects → Kocal → Jsdoc Vuejs

Kocal / Jsdoc Vuejs

Licence: mit
📖 A JSDoc plugin for documenting .vue files.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jsdoc Vuejs

Wemake Vue Template
Bleeding edge vue template focused on code quality and developer happiness.
Stars: ✭ 645 (+246.77%)
Mutual labels:  jsdoc
Nodetyped
Node.js Express Startup Seed with ES6, Typescript, SCSS, EJS, Nodemon, Bootstrap 4, TSLint, TypeDoc
Stars: ✭ 69 (-62.9%)
Mutual labels:  jsdoc
Vue Docgen Api
Toolbox to extract information from Vue component files for documentation generation purposes.
Stars: ✭ 100 (-46.24%)
Mutual labels:  jsdoc
Swagger Jsdoc
Generates swagger/openapi specification based on jsDoc comments and YAML files.
Stars: ✭ 1,057 (+468.28%)
Mutual labels:  jsdoc
Jsdoc Vue
A jsdoc plugin that parses *.vue files.
Stars: ✭ 64 (-65.59%)
Mutual labels:  jsdoc
Jsdoc To Markdown
Generate markdown documentation from jsdoc-annotated javascript
Stars: ✭ 1,199 (+544.62%)
Mutual labels:  jsdoc
Ydoc
🐶YDoc 是一个更懂你的文档站构建工具,基于 markdown 轻松生成完整静态站点
Stars: ✭ 566 (+204.3%)
Mutual labels:  jsdoc
Jsdoc
An API documentation generator for JavaScript.
Stars: ✭ 12,555 (+6650%)
Mutual labels:  jsdoc
Express Jsdoc Swagger
Swagger OpenAPI 3.x generator
Stars: ✭ 69 (-62.9%)
Mutual labels:  jsdoc
Vim Js
💯The most accurate syntax highlighting plugin for JavaScript and Flow.js
Stars: ✭ 99 (-46.77%)
Mutual labels:  jsdoc
Ts2jsdoc
Generate JSDoc from Typescript
Stars: ✭ 52 (-72.04%)
Mutual labels:  jsdoc
Doc Demo
Doc Demo, Show you how to write a qualified note.Now Include PHP/Javascript(注释标签范例,助你能更好理解每个注释标签的作用,目前包含了PHP/Javascript
Stars: ✭ 63 (-66.13%)
Mutual labels:  jsdoc
Jsdoctest
Run jsdoc examples as doctests.
Stars: ✭ 80 (-56.99%)
Mutual labels:  jsdoc
Jsdoc Baseline
An experimental, extensible template for JSDoc.
Stars: ✭ 51 (-72.58%)
Mutual labels:  jsdoc
Vanillajs Deck
A Vanilla.js Single Page App (SPA) slide deck for a presentation about Vanilla.js written with no frameworks.
Stars: ✭ 119 (-36.02%)
Mutual labels:  jsdoc
Documentation
📖 documentation for modern JavaScript
Stars: ✭ 5,443 (+2826.34%)
Mutual labels:  jsdoc
Vue Standalone Component
Vuejs template to build components with livecoding, tests, documentation and demos
Stars: ✭ 75 (-59.68%)
Mutual labels:  jsdoc
Vscode Fundamentals
👨‍🏫 Mike's Visual Studio Code Course
Stars: ✭ 175 (-5.91%)
Mutual labels:  jsdoc
Doxdox
📚 JSDoc to Markdown, Bootstrap, and custom Handlebars template documentation generator.
Stars: ✭ 139 (-25.27%)
Mutual labels:  jsdoc
Awesome Web Tutorial
「JavaScript学习资料整理」系列,构建JavaScript前端知识体系,积累JavaScript前端开发经验
Stars: ✭ 84 (-54.84%)
Mutual labels:  jsdoc

JSDoc for VueJS

npm version Build Status (Travis) Build Status (AppVeyor) codecov Codacy Badge

A JSDoc plugin for listing props, data, computed data, and methods from *.vue files.

Requirements

  • Node 10+
  • Vue 2

Installation

$ npm install --save-dev jsdoc jsdoc-vuejs

You also need to install vue-template-compiler that match your Vue version:

# if you use Vue 2.5.21
$ npm install --save-dev [email protected]

Usage

Your should update your JSDoc configuration to enable JSDoc-VueJS:

{
  "plugins": [
    "node_modules/jsdoc-vuejs"
  ],
  "source": {
    "includePattern": "\\.(vue|js)$"
  }
}

Update your .vue files with one of the following tags:

  • @vue-prop
  • @vue-data
  • @vue-computed
  • @vue-event

All of those tags work the same way than @param tag.

<template>
  <div>Hello world!</div>
</template>

<script>
  /**
   * @vue-prop {Number} initialCounter - Initial counter's value
   * @vue-prop {Number} [step=1] - Step
   * @vue-data {Number} counter - Current counter's value
   * @vue-computed {String} message
   * @vue-event {Number} increment - Emit counter's value after increment
   * @vue-event {Number} decrement - Emit counter's value after decrement
   */
  export default {
    props: {
      initialCounter: {
        type: Number,
        required: true,
      },
      step: {
        type: Number,
        default: 1,
      },
    },
    data () {
      return {
        counter: 0,
      }
    },
    computed: {
      message() {
        return `Current value is ${this.counter}`;
      }
    },
    methods: {
      increment() {
        this.counter += 1;
        this.$emit('increment', this.counter);
      },
      decrement() {
        this.counter -= 1;
        this.$emit('decrement', this.counter);
      }
    }
  }
</script>

Supported templates

The rendering engine has been rewritten in v2, it can supports every JSDoc templates that exists.

Actually, it supports 4 templates:

If you use a template that is not supported, it will use the default one as a fallback.

Feel free to open an issue/pull request if your template is not supported!

Default

Docstrap

Minami

Tui

Testing

Install Dependencies

$ git clone https://github.com/Kocal/jsdoc-vuejs
$ cd jsdoc-vuejs
$ yarn install

# For testing the example docs
$ cd example
$ yarn install

Generate documentations

$ cd example

# Generate docs for every renderer
$ yarn docs:all

# or one by one
$ yarn docs # default jsdoc template
$ yarn docs:docstrap
$ yarn docs:minami
$ yarn docs:tui

Unit

$ yarn test

E2E

Before running integration tests with Cypress, you should generate documentation with all renderers:

$ cd example
$ yarn docs:all

And then run Cypress:

$ cd ..
$ yarn cypress run

License

MIT.

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].