├── .eslintrc.json ├── .github ├── FUNDING.yml └── workflows │ ├── ci.yml │ └── release.yml ├── .gitignore ├── .releaserc ├── LICENSE ├── README.md ├── UPGRADE.md ├── __tests__ ├── core │ ├── __fixtures__ │ │ ├── Component.vue │ │ └── methods │ │ │ ├── Component.vue │ │ │ ├── Component │ │ │ └── Component.js │ │ │ ├── ComponentWithExportDefaultInTemplate.vue │ │ │ ├── ComponentWithSpaces.vue │ │ │ └── ScriptBeforeTemplate.vue │ ├── __snapshots__ │ │ └── vueScriptExtractor.js.snap │ ├── getTemplatePath.test.js │ ├── renderer.test.js │ ├── seekExportDefaultLine.js │ └── vueScriptExtractor.js └── stubs │ └── jsdoc │ └── lib │ └── jsdoc │ └── util │ └── templateHelper.js ├── config.js ├── cypress.json ├── cypress ├── fixtures │ └── example.json ├── integration │ └── templates │ │ ├── default.spec.js │ │ ├── docstrap.spec.js │ │ ├── minami.spec.js │ │ └── tui.spec.js ├── plugins │ └── index.js └── support │ ├── commands.js │ └── index.js ├── example ├── .jsdoc-docstrap.js ├── .jsdoc-minami.js ├── .jsdoc-tui.js ├── .jsdoc.js ├── README.md ├── package.json ├── src │ ├── Counter.vue │ ├── better-components │ │ └── BetterCounter.vue │ └── js │ │ ├── CounterJS.js │ │ ├── NotVueComponent.js │ │ └── NotVueComponent2.js └── yarn.lock ├── index.js ├── jest.config.js ├── lib ├── core │ ├── getTemplatePath.js │ ├── issers.js │ ├── renderer.js │ ├── seekExportDefaultLine.js │ └── vueScriptExtractor.js ├── tags │ ├── vue-computed.js │ ├── vue-data.js │ ├── vue-event.js │ └── vue-prop.js └── templates │ ├── default.ejs │ ├── docstrap.ejs │ ├── minami.ejs │ ├── tui.ejs │ └── utils │ └── renderType.js ├── package.json ├── screenshots └── templates │ ├── default.png │ ├── docstrap.png │ ├── minami.png │ └── tui.png └── yarn.lock /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "airbnb-base" 4 | ], 5 | "env": { 6 | "es6": true, 7 | "node": true, 8 | "jest": true, 9 | "cypress/globals": true 10 | }, 11 | "plugins": [ 12 | "cypress" 13 | ], 14 | "settings": { 15 | "import/core-modules": [ 16 | "jsdoc/env" 17 | ] 18 | }, 19 | "rules": { 20 | "no-param-reassign": ["error", { 21 | "props": true, 22 | "ignorePropertyModificationsFor": [ 23 | "doclet", // _isVueFile, ... 24 | "e" // for e.doclet 25 | ] 26 | }], 27 | "no-underscore-dangle": ["error", { 28 | "allow": [ 29 | "_isVueDoc", 30 | "_vueProps", 31 | "_vueData", 32 | "_vueComputed", 33 | "_vueEvent" 34 | ] 35 | }] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: Kocal 2 | custom: paypal.me/HAlliaume 3 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Node CI 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - '*' 7 | 8 | jobs: 9 | ci: 10 | runs-on: ${{ matrix.os }} 11 | 12 | strategy: 13 | matrix: 14 | os: [ubuntu-latest] 15 | node-version: [10.x, 12.x, 14.x] 16 | include: 17 | - os: windows-latest 18 | node: 12.x 19 | 20 | steps: 21 | - name: Set git to use LF 22 | run: | 23 | git config --global core.autocrlf false 24 | git config --global core.eol lf 25 | if: matrix.os == 'windows-latest' 26 | 27 | - uses: actions/checkout@v2 28 | 29 | - name: Use Node.js ${{ matrix.node-version }} 30 | uses: actions/setup-node@v1 31 | with: 32 | node-version: ${{ matrix.node-version }} 33 | 34 | - name: Get yarn cache directory 35 | id: yarn-cache 36 | run: echo "::set-output name=dir::$(yarn cache dir)" 37 | 38 | - name: Restore yarn cache (if available) 39 | uses: actions/cache@v1 40 | with: 41 | path: ${{ steps.yarn-cache.outputs.dir }} 42 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 43 | restore-keys: | 44 | ${{ runner.os }}-yarn- 45 | 46 | - run: yarn install --frozen-lockfile 47 | 48 | - run: | 49 | cd example 50 | yarn install --frozen-lockfile 51 | yarn docs 52 | yarn docs:docstrap 53 | yarn docs:minami 54 | yarn docs:tui 55 | cd .. 56 | 57 | - run: yarn lint 58 | 59 | - run: yarn test -i && npx codecov 60 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | release: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - name: Install Node.js 16 | uses: actions/setup-node@v1 17 | with: 18 | node-version: 12.x 19 | 20 | - run: yarn install --frozen-lockfile 21 | 22 | - run: yarn semantic-release 23 | env: 24 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | example/docs* 61 | cypress/screenshots/ 62 | cypress/videos/ 63 | -------------------------------------------------------------------------------- /.releaserc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@kocal/semantic-release-preset" 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Hugo Alliaume 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | JSDoc for VueJS 2 | =============== 3 | 4 | [![npm version](https://badge.fury.io/js/jsdoc-vuejs.svg)](https://badge.fury.io/js/jsdoc-vuejs) 5 | [![Build Status (Travis)](https://travis-ci.org/Kocal/jsdoc-vuejs.svg?branch=master)](https://travis-ci.org/Kocal/jsdoc-vuejs) 6 | [![Build Status (AppVeyor)](https://ci.appveyor.com/api/projects/status/a36pui6w1qhqq582?svg=true)](https://ci.appveyor.com/project/Kocal/jsdoc-vuejs) 7 | [![codecov](https://codecov.io/gh/Kocal/jsdoc-vuejs/branch/master/graph/badge.svg)](https://codecov.io/gh/Kocal/jsdoc-vuejs) 8 | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/850b7601f2bf4e8787a6aadbafa8afef)](https://www.codacy.com/app/kocal/jsdoc-vuejs?utm_source=github.com&utm_medium=referral&utm_content=Kocal/jsdoc-vuejs&utm_campaign=Badge_Grade) 9 | 10 | A JSDoc plugin for listing props, data, computed data, and methods from `.vue` files. 11 | 12 | :warning: This branch is for Vue 3. If you still use Vue 2, please see [`3.x` branch](https://github.com/Kocal/jsdoc-vuejs/tree/3.x). 13 | 14 | --- 15 | 16 | ## Requirements 17 | 18 | - Node 10+ 19 | - Vue 3 20 | 21 | ## Installation 22 | 23 | ```bash 24 | $ npm install --save-dev jsdoc jsdoc-vuejs 25 | ``` 26 | 27 | You also need to install `@vue/compiler-sfc` that match your Vue version: 28 | 29 | ```bash 30 | $ npm install --save-dev @vue/compiler-sfc 31 | ``` 32 | 33 | ## Usage 34 | 35 | Your should update your JSDoc configuration to enable JSDoc-VueJS: 36 | 37 | ```json 38 | { 39 | "plugins": [ 40 | "node_modules/jsdoc-vuejs" 41 | ], 42 | "source": { 43 | "includePattern": "\\.(vue|js)$" 44 | } 45 | } 46 | ``` 47 | 48 | Update your .vue files with one of the following tags: 49 | 50 | - `@vue-prop` 51 | - `@vue-data` 52 | - `@vue-computed` 53 | - `@vue-event` 54 | 55 | All of those tags work the same way than [`@param` tag](http://usejsdoc.org/tags-param.html). 56 | 57 | ```vue 58 | 61 | 62 | 104 | ``` 105 | 106 | ## Supported templates 107 | 108 | The rendering engine has been rewritten in v2, it can supports every JSDoc templates that exists. 109 | 110 | Actually, it supports 4 templates: 111 | - Default 112 | - [Docstrap](https://github.com/docstrap/docstrap) 113 | - [Minami](https://github.com/nijikokun/minami) 114 | - [Tui](https://github.com/nhnent/tui.jsdoc-template) 115 | 116 | If you use a template that is not supported, it will use the default one as a fallback. 117 | 118 | Feel free to open an issue/pull request if your template is not supported! 119 | 120 |
121 | Default 122 | 123 | ![](./screenshots/templates/default.png) 124 | 125 |
126 | 127 |
128 | Docstrap 129 | 130 | ![](./screenshots/templates/docstrap.png) 131 | 132 |
133 | 134 |
135 | Minami 136 | 137 | ![](./screenshots/templates/minami.png) 138 | 139 |
140 | 141 |
142 | Tui 143 | 144 | ![](./screenshots/templates/tui.png) 145 | 146 |
147 | 148 | ## Testing 149 | 150 | ### Install Dependencies 151 | 152 | ```bash 153 | $ git clone https://github.com/Kocal/jsdoc-vuejs 154 | $ cd jsdoc-vuejs 155 | $ yarn install 156 | 157 | # For testing the example docs 158 | $ cd example 159 | $ yarn install 160 | ``` 161 | 162 | #### Generate documentations 163 | 164 | ```bash 165 | $ cd example 166 | 167 | # Generate docs for every renderer 168 | $ yarn docs:all 169 | 170 | # or one by one 171 | $ yarn docs # default jsdoc template 172 | $ yarn docs:docstrap 173 | $ yarn docs:minami 174 | $ yarn docs:tui 175 | ``` 176 | 177 | ### Unit 178 | 179 | ```bash 180 | $ yarn test 181 | ``` 182 | 183 | ### E2E 184 | 185 | Before running integration tests with [Cypress](https://cypress.io), 186 | you should generate documentation with all renderers: 187 | 188 | ```bash 189 | $ cd example 190 | $ yarn docs:all 191 | ``` 192 | 193 | And then run Cypress: 194 | 195 | ```bash 196 | $ cd .. 197 | $ yarn cypress run 198 | ``` 199 | 200 | ## License 201 | 202 | MIT. 203 | -------------------------------------------------------------------------------- /UPGRADE.md: -------------------------------------------------------------------------------- 1 | ## Upgrade from 1.x to 2.x 2 | 3 | ### Configuration 4 | 5 | You MUST remove `jsdoc-vuejs` configuration key inside JSDoc config file, 6 | because it is not used anymore. 7 | 8 | **Before:** 9 | ```json 10 | { 11 | "plugins": [ 12 | "node_modules/jsdoc-vuejs" 13 | ], 14 | "source": { 15 | "includePattern": "\\.(vue|js)$" 16 | }, 17 | "jsdoc-vuejs": { 18 | "followImports": true // enable/disable require/import function 19 | } 20 | } 21 | ``` 22 | 23 | **After:** 24 | ```json 25 | { 26 | "plugins": [ 27 | "node_modules/jsdoc-vuejs" 28 | ], 29 | "source": { 30 | "includePattern": "\\.(vue|js)$" 31 | } 32 | } 33 | ``` 34 | 35 | ### Usage 36 | 37 | You SHOULD NOT use `@vue` tag anymore. 38 | 39 | Instead, you should use `@vue-prop`, `@vue-data`, and `@vue-computed` like this: 40 | 41 | ```vue 42 | 45 | 46 | 57 | ``` 58 | -------------------------------------------------------------------------------- /__tests__/core/__fixtures__/Component.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | -------------------------------------------------------------------------------- /__tests__/core/__fixtures__/methods/Component.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 21 | -------------------------------------------------------------------------------- /__tests__/core/__fixtures__/methods/Component/Component.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @vue-prop {String} test - test description 4 | * @vue-data {String} [foo=bar] - Foo description 5 | */ 6 | export default ({ 7 | name: 'component', 8 | props: { 9 | test: { 10 | type: String, 11 | }, 12 | }, 13 | data() { 14 | return { 15 | foo: 'bar', 16 | }; 17 | }, 18 | methods: {}, 19 | computed: {}, 20 | }); 21 | -------------------------------------------------------------------------------- /__tests__/core/__fixtures__/methods/ComponentWithExportDefaultInTemplate.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | -------------------------------------------------------------------------------- /__tests__/core/__fixtures__/methods/ComponentWithSpaces.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 31 | -------------------------------------------------------------------------------- /__tests__/core/__fixtures__/methods/ScriptBeforeTemplate.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /__tests__/core/__snapshots__/vueScriptExtractor.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`core.extractVueScript extract script 1`] = ` 4 | " 5 | /** 6 | * @vue-data {String} [foo=bar] Foo description 7 | */ 8 | export default { 9 | name: 'Component', 10 | data() { 11 | return { 12 | foo: 'bar' 13 | } 14 | } 15 | } 16 | " 17 | `; 18 | -------------------------------------------------------------------------------- /__tests__/core/getTemplatePath.test.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | const { normalize } = require('path'); 3 | const getTemplatePath = require('../../lib/core/getTemplatePath'); 4 | 5 | describe('guessTemplatePath', () => { 6 | test('guess default', () => { 7 | expect(getTemplatePath().endsWith(normalize('lib/templates/default.ejs'))).toBeTruthy(); 8 | expect(getTemplatePath('default').endsWith(normalize('lib/templates/default.ejs'))).toBeTruthy(); 9 | }); 10 | 11 | test('guess docstrap', () => { 12 | const templatePath = getTemplatePath('./node_modules/ink-docstrap/template'); 13 | 14 | expect(templatePath.endsWith(normalize('lib/templates/docstrap.ejs'))).toBeTruthy(); 15 | }); 16 | 17 | test('guess minami', () => { 18 | const templatePath = getTemplatePath('node_modules/minami'); 19 | 20 | expect(templatePath.endsWith(normalize('lib/templates/minami.ejs'))).toBeTruthy(); 21 | }); 22 | 23 | test('guess tui', () => { 24 | const templatePath = getTemplatePath('node_modules/tui-jsdoc-template'); 25 | 26 | expect(templatePath.endsWith(normalize('lib/templates/tui.ejs'))).toBeTruthy(); 27 | }); 28 | 29 | test('guess unsupported', () => { 30 | console.warn = jest.fn(); 31 | 32 | expect(getTemplatePath('foo-bar').endsWith(normalize('lib/templates/default.ejs'))).toBeTruthy(); 33 | expect(console.warn).toHaveBeenCalledWith('The template "foo-bar" is not recognized by jsdoc-vuejs. Using default template as fallback.'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /__tests__/core/renderer.test.js: -------------------------------------------------------------------------------- 1 | const ejs = require('ejs'); 2 | const renderer = require('../../lib/core/renderer'); 3 | 4 | describe('code.renderer', () => { 5 | beforeEach(() => { 6 | ejs.renderFile = jest.fn(); 7 | }); 8 | 9 | it('should call ejs render method', () => { 10 | const cb = () => {}; 11 | 12 | renderer('my-template', { 13 | props: ['props'], data: ['data'], computed: ['computed'], event: ['event'], 14 | }, cb); 15 | 16 | expect(ejs.renderFile).toHaveBeenCalledTimes(1); 17 | expect(ejs.renderFile).toHaveBeenCalledWith( 18 | 'my-template', 19 | { 20 | props: ['props'], 21 | data: ['data'], 22 | computed: ['computed'], 23 | event: ['event'], 24 | // an helper function, it should be under keys "utils" or "helpers" btw 25 | renderType: expect.any(Function), 26 | }, 27 | cb, 28 | ); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /__tests__/core/seekExportDefaultLine.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const fs = require('fs'); 3 | const seekExportDefaultLine = require('../../lib/core/seekExportDefaultLine'); 4 | 5 | const readComponent = (componentPath, cb) => { 6 | const filename = path.join(__dirname, `__fixtures__/methods/${componentPath}`); 7 | 8 | fs.readFile(filename, 'utf8', (err, source) => cb(source)); 9 | }; 10 | 11 | describe('core.seekExportDefaultLine', () => { 12 | test('A normal component', (done) => { 13 | readComponent('Component.vue', (source) => { 14 | expect(seekExportDefaultLine(source)).toBe(9); 15 | done(); 16 | }); 17 | }); 18 | 19 | test('A normal component with a lot of spaces', (done) => { 20 | readComponent('ComponentWithSpaces.vue', (source) => { 21 | expect(seekExportDefaultLine(source)).toBe(14); 22 | done(); 23 | }); 24 | }); 25 | 26 | test('When 34 | -------------------------------------------------------------------------------- /example/src/better-components/BetterCounter.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 81 | -------------------------------------------------------------------------------- /example/src/js/CounterJS.js: -------------------------------------------------------------------------------- 1 | import { mapState } from 'vuex'; 2 | 3 | /** 4 | * @module CounterJS 5 | * @vue-prop {Number} initialCounter 6 | * @vue-prop {Number} [step=1] Step 7 | * @vue-data {Number} counter - Current counter's value 8 | * @vue-computed {Array.} fooList - A list of foo 9 | * @vue-computed {Array.} barList - A list of bar 10 | * @vue-computed {String} message A message 11 | */ 12 | export default { 13 | name: 'CounterJS', 14 | props: { 15 | initialCounter: { type: Number, required: true }, 16 | step: { type: Number, default: 1 }, 17 | }, 18 | data() { 19 | return { 20 | counter: this.initialCounter, 21 | }; 22 | }, 23 | computed: { 24 | ...mapState({ 25 | fooList: state => state.$_foo.fooList, 26 | barList: state => state.$_foo.barList, 27 | }), 28 | message() { 29 | return `Counter: ${this.counter}`; 30 | }, 31 | }, 32 | methods: { 33 | /** 34 | * Increment counter. 35 | */ 36 | increment() { 37 | this.counter += this.step; 38 | }, 39 | 40 | /** 41 | * Decrement counter. 42 | */ 43 | decrement() { 44 | this.counter -= this.step; 45 | }, 46 | 47 | /** 48 | * Show a dialog displaying counter value. 49 | * @param {Number} counter - Counter value 50 | */ 51 | showDialog(counter) { 52 | alert(`Counter value is ${counter}.`); 53 | }, 54 | }, 55 | 56 | /** 57 | * Counter.vue `created` hook. 58 | */ 59 | created() { 60 | console.info('Counter.vue: created()'); 61 | }, 62 | mounted() { 63 | console.info('Counter.vue: mounted()'); 64 | }, 65 | }; 66 | -------------------------------------------------------------------------------- /example/src/js/NotVueComponent.js: -------------------------------------------------------------------------------- 1 | import NotVueComponent2 from './NotVueComponent2'; 2 | 3 | NotVueComponent2.theMethod('123'); 4 | 5 | /** 6 | * @return {Boolean} 7 | */ 8 | const helloWorld = () => { 9 | console.log('Hello world'); 10 | return false; 11 | }; 12 | 13 | export { 14 | helloWorld, 15 | }; 16 | -------------------------------------------------------------------------------- /example/src/js/NotVueComponent2.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @module NotVueComponent2 3 | */ 4 | module.exports = { 5 | state: { 6 | foo: 'bar', 7 | }, 8 | /** 9 | * @param {String} i 10 | */ 11 | theMethod(i) { 12 | console.log(i); 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /example/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/parser@^7.4.4": 6 | version "7.5.5" 7 | resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz" 8 | integrity sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g== 9 | 10 | ansi-styles@^3.2.1: 11 | version "3.2.1" 12 | resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" 13 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== 14 | dependencies: 15 | color-convert "^1.9.0" 16 | 17 | argparse@^1.0.7: 18 | version "1.0.10" 19 | resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" 20 | integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== 21 | dependencies: 22 | sprintf-js "~1.0.2" 23 | 24 | array-uniq@^1.0.2: 25 | version "1.0.3" 26 | resolved "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" 27 | integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= 28 | 29 | bluebird@^3.5.4: 30 | version "3.5.5" 31 | resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz" 32 | integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== 33 | 34 | boolbase@~1.0.0: 35 | version "1.0.0" 36 | resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz" 37 | integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= 38 | 39 | catharsis@^0.8.11: 40 | version "0.8.11" 41 | resolved "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz" 42 | integrity sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g== 43 | dependencies: 44 | lodash "^4.17.14" 45 | 46 | chalk@^2.3.0, chalk@^2.4.1: 47 | version "2.4.1" 48 | resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz" 49 | integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== 50 | dependencies: 51 | ansi-styles "^3.2.1" 52 | escape-string-regexp "^1.0.5" 53 | supports-color "^5.3.0" 54 | 55 | cheerio@^0.22.0: 56 | version "0.22.0" 57 | resolved "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz" 58 | integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4= 59 | dependencies: 60 | css-select "~1.2.0" 61 | dom-serializer "~0.1.0" 62 | entities "~1.1.1" 63 | htmlparser2 "^3.9.1" 64 | lodash.assignin "^4.0.9" 65 | lodash.bind "^4.1.4" 66 | lodash.defaults "^4.0.1" 67 | lodash.filter "^4.4.0" 68 | lodash.flatten "^4.2.0" 69 | lodash.foreach "^4.3.0" 70 | lodash.map "^4.4.0" 71 | lodash.merge "^4.4.0" 72 | lodash.pick "^4.2.1" 73 | lodash.reduce "^4.4.0" 74 | lodash.reject "^4.4.0" 75 | lodash.some "^4.4.0" 76 | 77 | color-convert@^1.9.0: 78 | version "1.9.2" 79 | resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz" 80 | integrity sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg== 81 | dependencies: 82 | color-name "1.1.1" 83 | 84 | color-name@1.1.1: 85 | version "1.1.1" 86 | resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz" 87 | integrity sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok= 88 | 89 | core-util-is@~1.0.0: 90 | version "1.0.2" 91 | resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" 92 | integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= 93 | 94 | css-select@~1.2.0: 95 | version "1.2.0" 96 | resolved "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz" 97 | integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= 98 | dependencies: 99 | boolbase "~1.0.0" 100 | css-what "2.1" 101 | domutils "1.5.1" 102 | nth-check "~1.0.1" 103 | 104 | css-what@2.1: 105 | version "2.1.0" 106 | resolved "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz" 107 | integrity sha1-lGfQMsOM+u+58teVASUwYvh/ob0= 108 | 109 | dom-serializer@0, dom-serializer@~0.1.0: 110 | version "0.1.0" 111 | resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz" 112 | integrity sha1-BzxpdUbOB4DOI75KKOKT5AvDDII= 113 | dependencies: 114 | domelementtype "~1.1.1" 115 | entities "~1.1.1" 116 | 117 | domelementtype@1, domelementtype@^1.3.0: 118 | version "1.3.0" 119 | resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz" 120 | integrity sha1-sXrtguirWeUt2cGbF1bg/BhyBMI= 121 | 122 | domelementtype@~1.1.1: 123 | version "1.1.3" 124 | resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz" 125 | integrity sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs= 126 | 127 | domhandler@^2.3.0: 128 | version "2.4.2" 129 | resolved "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz" 130 | integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== 131 | dependencies: 132 | domelementtype "1" 133 | 134 | domutils@1.5.1: 135 | version "1.5.1" 136 | resolved "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz" 137 | integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= 138 | dependencies: 139 | dom-serializer "0" 140 | domelementtype "1" 141 | 142 | domutils@^1.5.1: 143 | version "1.7.0" 144 | resolved "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz" 145 | integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== 146 | dependencies: 147 | dom-serializer "0" 148 | domelementtype "1" 149 | 150 | entities@^1.1.1, entities@~1.1.1: 151 | version "1.1.1" 152 | resolved "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz" 153 | integrity sha1-blwtClYhtdra7O+AuQ7ftc13cvA= 154 | 155 | escape-string-regexp@^1.0.5: 156 | version "1.0.5" 157 | resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" 158 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= 159 | 160 | escape-string-regexp@^2.0.0: 161 | version "2.0.0" 162 | resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" 163 | integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== 164 | 165 | graceful-fs@^4.1.9: 166 | version "4.1.11" 167 | resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" 168 | integrity sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= 169 | 170 | has-flag@^3.0.0: 171 | version "3.0.0" 172 | resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" 173 | integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= 174 | 175 | htmlparser2@^3.9.0, htmlparser2@^3.9.1: 176 | version "3.9.2" 177 | resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz" 178 | integrity sha1-G9+HrMoPP55T+k/M6w9LTLsAszg= 179 | dependencies: 180 | domelementtype "^1.3.0" 181 | domhandler "^2.3.0" 182 | domutils "^1.5.1" 183 | entities "^1.1.1" 184 | inherits "^2.0.1" 185 | readable-stream "^2.0.2" 186 | 187 | inherits@^2.0.1, inherits@~2.0.3: 188 | version "2.0.3" 189 | resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" 190 | integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= 191 | 192 | ink-docstrap@^1.3.2: 193 | version "1.3.2" 194 | resolved "https://registry.npmjs.org/ink-docstrap/-/ink-docstrap-1.3.2.tgz" 195 | integrity sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q== 196 | dependencies: 197 | moment "^2.14.1" 198 | sanitize-html "^1.13.0" 199 | 200 | isarray@~1.0.0: 201 | version "1.0.0" 202 | resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" 203 | integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= 204 | 205 | js2xmlparser@^4.0.0: 206 | version "4.0.0" 207 | resolved "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.0.tgz" 208 | integrity sha512-WuNgdZOXVmBk5kUPMcTcVUpbGRzLfNkv7+7APq7WiDihpXVKrgxo6wwRpRl9OQeEBgKCVk9mR7RbzrnNWC8oBw== 209 | dependencies: 210 | xmlcreate "^2.0.0" 211 | 212 | jsdoc@^3.6.3: 213 | version "3.6.3" 214 | resolved "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.3.tgz" 215 | integrity sha512-Yf1ZKA3r9nvtMWHO1kEuMZTlHOF8uoQ0vyo5eH7SQy5YeIiHM+B0DgKnn+X6y6KDYZcF7G2SPkKF+JORCXWE/A== 216 | dependencies: 217 | "@babel/parser" "^7.4.4" 218 | bluebird "^3.5.4" 219 | catharsis "^0.8.11" 220 | escape-string-regexp "^2.0.0" 221 | js2xmlparser "^4.0.0" 222 | klaw "^3.0.0" 223 | markdown-it "^8.4.2" 224 | markdown-it-anchor "^5.0.2" 225 | marked "^0.7.0" 226 | mkdirp "^0.5.1" 227 | requizzle "^0.2.3" 228 | strip-json-comments "^3.0.1" 229 | taffydb "2.6.2" 230 | underscore "~1.9.1" 231 | 232 | klaw@^3.0.0: 233 | version "3.0.0" 234 | resolved "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz" 235 | integrity sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g== 236 | dependencies: 237 | graceful-fs "^4.1.9" 238 | 239 | linkify-it@^2.0.0: 240 | version "2.2.0" 241 | resolved "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz" 242 | integrity sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw== 243 | dependencies: 244 | uc.micro "^1.0.1" 245 | 246 | lodash.assignin@^4.0.9: 247 | version "4.2.0" 248 | resolved "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz" 249 | integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= 250 | 251 | lodash.bind@^4.1.4: 252 | version "4.2.1" 253 | resolved "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz" 254 | integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= 255 | 256 | lodash.clonedeep@^4.5.0: 257 | version "4.5.0" 258 | resolved "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz" 259 | integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= 260 | 261 | lodash.defaults@^4.0.1: 262 | version "4.2.0" 263 | resolved "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz" 264 | integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= 265 | 266 | lodash.escaperegexp@^4.1.2: 267 | version "4.1.2" 268 | resolved "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz" 269 | integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= 270 | 271 | lodash.filter@^4.4.0: 272 | version "4.6.0" 273 | resolved "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz" 274 | integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4= 275 | 276 | lodash.flatten@^4.2.0: 277 | version "4.4.0" 278 | resolved "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz" 279 | integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= 280 | 281 | lodash.foreach@^4.3.0: 282 | version "4.5.0" 283 | resolved "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz" 284 | integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= 285 | 286 | lodash.isplainobject@^4.0.6: 287 | version "4.0.6" 288 | resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" 289 | integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= 290 | 291 | lodash.isstring@^4.0.1: 292 | version "4.0.1" 293 | resolved "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" 294 | integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= 295 | 296 | lodash.map@^4.4.0: 297 | version "4.6.0" 298 | resolved "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz" 299 | integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= 300 | 301 | lodash.merge@^4.4.0: 302 | version "4.6.2" 303 | resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" 304 | integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== 305 | 306 | lodash.mergewith@^4.6.0: 307 | version "4.6.2" 308 | resolved "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz" 309 | integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== 310 | 311 | lodash.pick@^4.2.1: 312 | version "4.4.0" 313 | resolved "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz" 314 | integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= 315 | 316 | lodash.reduce@^4.4.0: 317 | version "4.6.0" 318 | resolved "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz" 319 | integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs= 320 | 321 | lodash.reject@^4.4.0: 322 | version "4.6.0" 323 | resolved "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz" 324 | integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU= 325 | 326 | lodash.some@^4.4.0: 327 | version "4.6.0" 328 | resolved "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz" 329 | integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= 330 | 331 | lodash@^4.17.14: 332 | version "4.17.15" 333 | resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz" 334 | integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== 335 | 336 | markdown-it-anchor@^5.0.2: 337 | version "5.2.4" 338 | resolved "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.2.4.tgz" 339 | integrity sha512-n8zCGjxA3T+Mx1pG8HEgbJbkB8JFUuRkeTZQuIM8iPY6oQ8sWOPRZJDFC9a/pNg2QkHEjjGkhBEl/RSyzaDZ3A== 340 | 341 | markdown-it@^8.4.2: 342 | version "8.4.2" 343 | resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz" 344 | integrity sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ== 345 | dependencies: 346 | argparse "^1.0.7" 347 | entities "~1.1.1" 348 | linkify-it "^2.0.0" 349 | mdurl "^1.0.1" 350 | uc.micro "^1.0.5" 351 | 352 | marked@^0.7.0: 353 | version "0.7.0" 354 | resolved "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz" 355 | integrity sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg== 356 | 357 | mdurl@^1.0.1: 358 | version "1.0.1" 359 | resolved "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz" 360 | integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= 361 | 362 | minami@^1.2.3: 363 | version "1.2.3" 364 | resolved "https://registry.npmjs.org/minami/-/minami-1.2.3.tgz" 365 | integrity sha1-mbbc37LwpU2hycj3qjoyd4eq+fg= 366 | 367 | minimist@0.0.8: 368 | version "0.0.8" 369 | resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" 370 | integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= 371 | 372 | mkdirp@^0.5.1: 373 | version "0.5.1" 374 | resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" 375 | integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= 376 | dependencies: 377 | minimist "0.0.8" 378 | 379 | moment@^2.14.1: 380 | version "2.22.2" 381 | resolved "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz" 382 | integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y= 383 | 384 | nth-check@~1.0.1: 385 | version "1.0.1" 386 | resolved "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz" 387 | integrity sha1-mSms32KPwsQQmN6rgqxYDPFJquQ= 388 | dependencies: 389 | boolbase "~1.0.0" 390 | 391 | number-is-nan@^1.0.0: 392 | version "1.0.1" 393 | resolved "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" 394 | integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= 395 | 396 | postcss@^6.0.14: 397 | version "6.0.22" 398 | resolved "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz" 399 | integrity sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA== 400 | dependencies: 401 | chalk "^2.4.1" 402 | source-map "^0.6.1" 403 | supports-color "^5.4.0" 404 | 405 | process-nextick-args@~2.0.0: 406 | version "2.0.0" 407 | resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz" 408 | integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== 409 | 410 | readable-stream@^2.0.2: 411 | version "2.3.6" 412 | resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz" 413 | integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== 414 | dependencies: 415 | core-util-is "~1.0.0" 416 | inherits "~2.0.3" 417 | isarray "~1.0.0" 418 | process-nextick-args "~2.0.0" 419 | safe-buffer "~5.1.1" 420 | string_decoder "~1.1.1" 421 | util-deprecate "~1.0.1" 422 | 423 | requizzle@^0.2.3: 424 | version "0.2.3" 425 | resolved "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz" 426 | integrity sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ== 427 | dependencies: 428 | lodash "^4.17.14" 429 | 430 | safe-buffer@~5.1.0, safe-buffer@~5.1.1: 431 | version "5.1.2" 432 | resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" 433 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== 434 | 435 | sanitize-html@^1.13.0: 436 | version "1.18.2" 437 | resolved "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.18.2.tgz" 438 | integrity sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg== 439 | dependencies: 440 | chalk "^2.3.0" 441 | htmlparser2 "^3.9.0" 442 | lodash.clonedeep "^4.5.0" 443 | lodash.escaperegexp "^4.1.2" 444 | lodash.isplainobject "^4.0.6" 445 | lodash.isstring "^4.0.1" 446 | lodash.mergewith "^4.6.0" 447 | postcss "^6.0.14" 448 | srcset "^1.0.0" 449 | xtend "^4.0.0" 450 | 451 | source-map@^0.6.1: 452 | version "0.6.1" 453 | resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" 454 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 455 | 456 | sprintf-js@~1.0.2: 457 | version "1.0.3" 458 | resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" 459 | integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= 460 | 461 | srcset@^1.0.0: 462 | version "1.0.0" 463 | resolved "https://registry.npmjs.org/srcset/-/srcset-1.0.0.tgz" 464 | integrity sha1-pWad4StC87HV6D7QPHEEb8SPQe8= 465 | dependencies: 466 | array-uniq "^1.0.2" 467 | number-is-nan "^1.0.0" 468 | 469 | string_decoder@~1.1.1: 470 | version "1.1.1" 471 | resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" 472 | integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== 473 | dependencies: 474 | safe-buffer "~5.1.0" 475 | 476 | strip-json-comments@^3.0.1: 477 | version "3.0.1" 478 | resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz" 479 | integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== 480 | 481 | supports-color@^5.3.0, supports-color@^5.4.0: 482 | version "5.4.0" 483 | resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz" 484 | integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w== 485 | dependencies: 486 | has-flag "^3.0.0" 487 | 488 | taffydb@2.6.2: 489 | version "2.6.2" 490 | resolved "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz" 491 | integrity sha1-fLy2S1oUG2ou/CxdLGe04VCyomg= 492 | 493 | tui-jsdoc-template@^1.2.2: 494 | version "1.2.2" 495 | resolved "https://registry.npmjs.org/tui-jsdoc-template/-/tui-jsdoc-template-1.2.2.tgz" 496 | integrity sha512-oqw0IYaot86VJ2owKBozJnilgta0Z55x8r9PeHj7vb+jDoSvJGRUQUcgs56SZh9HE20fx54Pe75p84X85/ygLA== 497 | dependencies: 498 | cheerio "^0.22.0" 499 | 500 | uc.micro@^1.0.1, uc.micro@^1.0.5: 501 | version "1.0.6" 502 | resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz" 503 | integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== 504 | 505 | underscore@~1.9.1: 506 | version "1.9.1" 507 | resolved "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz" 508 | integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== 509 | 510 | util-deprecate@~1.0.1: 511 | version "1.0.2" 512 | resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" 513 | integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= 514 | 515 | vuex@^3.0.1: 516 | version "3.0.1" 517 | resolved "https://registry.npmjs.org/vuex/-/vuex-3.0.1.tgz" 518 | integrity sha512-wLoqz0B7DSZtgbWL1ShIBBCjv22GV5U+vcBFox658g6V0s4wZV9P4YjCNyoHSyIBpj1f29JBoNQIqD82cR4O3w== 519 | 520 | xmlcreate@^2.0.0: 521 | version "2.0.1" 522 | resolved "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.1.tgz" 523 | integrity sha512-MjGsXhKG8YjTKrDCXseFo3ClbMGvUD4en29H2Cev1dv4P/chlpw6KdYmlCWDkhosBVKRDjM836+3e3pm1cBNJA== 524 | 525 | xtend@^4.0.0: 526 | version "4.0.1" 527 | resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" 528 | integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= 529 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const { join } = require('path'); 2 | const config = require('./config'); 3 | const render = require('./lib/core/renderer'); 4 | const extractVueScript = require('./lib/core/vueScriptExtractor'); 5 | const seekExportDefaultLine = require('./lib/core/seekExportDefaultLine'); 6 | const { isSingleFileComponent, isJSComponent } = require('./lib/core/issers'); 7 | const vueDataTag = require('./lib/tags/vue-data'); 8 | const vuePropTag = require('./lib/tags/vue-prop'); 9 | const vueComputedTag = require('./lib/tags/vue-computed'); 10 | const vueEventTag = require('./lib/tags/vue-event'); 11 | 12 | // Used to compute good line number for Vue methods 13 | const exportDefaultLines = {}; 14 | const mainDocletLines = {}; 15 | 16 | exports.handlers = { 17 | beforeParse(e) { 18 | if (/\.vue$/.test(e.filename)) { 19 | exportDefaultLines[e.filename] = seekExportDefaultLine(e.source, e.filename); 20 | e.source = extractVueScript(e.filename); 21 | } 22 | }, 23 | newDoclet(e) { 24 | const fileIsSingleFileComponent = isSingleFileComponent(e.doclet); 25 | const fileIsJSComponent = isJSComponent(e.doclet); 26 | if (!fileIsSingleFileComponent && !fileIsJSComponent) { 27 | return; 28 | } 29 | 30 | const fullPath = join(e.doclet.meta.path, e.doclet.meta.filename); 31 | const componentName = e.doclet.meta.filename.replace(/\.(vue|js)$/, ''); 32 | 33 | // The main doclet before `export default {}` 34 | if (e.doclet.longname === 'module.exports') { 35 | e.doclet.kind = 'module'; 36 | e.doclet.name = componentName; 37 | e.doclet.alias = componentName; 38 | e.doclet.longname = `module:${componentName}`; 39 | } 40 | 41 | if ( 42 | !/[.~#]/.test(e.doclet.longname) // filter component's properties and member, not the best way but it werks 43 | && e.doclet.longname.startsWith('module:') 44 | ) { 45 | mainDocletLines[fullPath] = e.doclet.meta.lineno; 46 | } 47 | 48 | // It can be the main doclet before `export default {}` 49 | // with at least one `@vue-*` tag 50 | if (e.doclet._isVueDoc) { 51 | const { template } = config['jsdoc-vuejs']; 52 | const data = { 53 | props: e.doclet._vueProps || [], 54 | data: e.doclet._vueData || [], 55 | computed: e.doclet._vueComputed || [], 56 | event: e.doclet._vueEvent || [], 57 | }; 58 | 59 | render(template, data, (err, str) => { 60 | if (err) throw err; 61 | 62 | e.doclet.description = (e.doclet.description || '') + str; 63 | }); 64 | 65 | // Remove meta for not rendering source for this doclet 66 | delete e.doclet.meta; 67 | } 68 | 69 | // Methods and hooks 70 | if (e.doclet.kind === 'function' && 'memberof' in e.doclet) { 71 | if (e.doclet.memberof.endsWith('.methods')) { 72 | e.doclet.scope = 'instance'; 73 | e.doclet.memberof = e.doclet.memberof.replace(/\.methods$/, ''); // force method to be displayed 74 | if (fileIsSingleFileComponent) { 75 | e.doclet.meta.lineno += exportDefaultLines[fullPath] - mainDocletLines[fullPath]; 76 | } 77 | } else { 78 | e.doclet.memberof = null; // don't include Vue hooks 79 | } 80 | } 81 | }, 82 | }; 83 | 84 | exports.defineTags = function defineTags(dictionary) { 85 | dictionary.defineTag(vueDataTag.name, vueDataTag.options); 86 | dictionary.defineTag(vuePropTag.name, vuePropTag.options); 87 | dictionary.defineTag(vueComputedTag.name, vueComputedTag.options); 88 | dictionary.defineTag(vueEventTag.name, vueEventTag.options); 89 | }; 90 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bail: true, 3 | verbose: !process.env.CI, 4 | collectCoverage: !!process.env.CI, 5 | collectCoverageFrom: [ 6 | 'lib/core/*.js', 7 | ], 8 | testPathIgnorePatterns: [ 9 | '/node_modules/', 10 | '/__fixtures__/', 11 | '/__tests__/stubs', 12 | '/cypress/', 13 | ], 14 | moduleNameMapper: { 15 | 'jsdoc/(.*)': '/__tests__/stubs/jsdoc/$1.js', 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /lib/core/getTemplatePath.js: -------------------------------------------------------------------------------- 1 | const { resolve } = require('path'); 2 | 3 | module.exports = function getTemplatePath(template) { 4 | // eslint-disable-next-line no-param-reassign 5 | template = template || 'default'; 6 | 7 | const templateFilename = (() => { 8 | switch (true) { 9 | case template === 'default': 10 | return 'default.ejs'; 11 | case /ink-docstrap\/template/.test(template): 12 | return 'docstrap.ejs'; 13 | case /minami/.test(template): 14 | return 'minami.ejs'; 15 | case /tui-jsdoc-template/.test(template): 16 | return 'tui.ejs'; 17 | default: 18 | // eslint-disable-next-line no-console 19 | console.warn(`The template "${template}" is not recognized by jsdoc-vuejs. Using default template as fallback.`); 20 | return 'default.ejs'; 21 | } 22 | })(); 23 | 24 | const path = resolve(__dirname, '../templates', templateFilename); 25 | 26 | return resolve(path); 27 | }; 28 | -------------------------------------------------------------------------------- /lib/core/issers.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | const hasVueTagRE = /\s*\*\s*@vue/; 4 | 5 | // Useful because we use `@vue` tag from first doclet of a .js file 6 | // to determine if this file is a Vue Component. 7 | /** 8 | * @type {Object.} 9 | */ 10 | const jsComponentsCache = {}; 11 | 12 | /** 13 | * @param {Doclet} doclet 14 | */ 15 | function isSingleFileComponent(doclet) { 16 | return doclet.meta.filename.endsWith('.vue'); 17 | } 18 | 19 | /** 20 | * @param {Doclet} doclet 21 | */ 22 | function isJSComponent(doclet) { 23 | const fullPath = path.join(doclet.meta.path, doclet.meta.filename); 24 | 25 | if (fullPath in jsComponentsCache) { 26 | return jsComponentsCache[fullPath]; 27 | } 28 | 29 | const res = doclet.meta.filename.endsWith('.js') && hasVueTagRE.test(doclet.comment || ''); 30 | 31 | if (res) { 32 | jsComponentsCache[fullPath] = true; 33 | } 34 | 35 | return res; 36 | } 37 | 38 | module.exports = { 39 | isSingleFileComponent, 40 | isJSComponent, 41 | }; 42 | -------------------------------------------------------------------------------- /lib/core/renderer.js: -------------------------------------------------------------------------------- 1 | const ejs = require('ejs'); 2 | const renderType = require('../templates/utils/renderType'); 3 | 4 | module.exports = function render(template, { 5 | props, data, computed, event, 6 | }, cb) { 7 | ejs.renderFile( 8 | template, 9 | { 10 | renderType, 11 | props, 12 | data, 13 | computed, 14 | event, 15 | }, 16 | cb, 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /lib/core/seekExportDefaultLine.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-continue */ 2 | 3 | module.exports = function seekExportDefaultLine(source, filename) { 4 | let inScript = filename ? filename.endsWith('.js') : false; 5 | 6 | // eslint-disable-next-line no-restricted-syntax 7 | for (const [i, line] of source.split(/\r?\n/).entries()) { 8 | if (line.trim() === '') { 9 | continue; 10 | } 11 | 12 | if (/]*>/.test(line)) { 13 | inScript = true; 14 | } else if (!inScript && /<\/script>/.test(line)) { 15 | inScript = false; 16 | } 17 | 18 | if (inScript && /export\s+default/.test(line)) { 19 | return i + 1; // index starts at 0, but file's lines start at 1 20 | } 21 | } 22 | 23 | return 0; 24 | }; 25 | -------------------------------------------------------------------------------- /lib/core/vueScriptExtractor.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const compiler = require('@vue/compiler-sfc'); 3 | 4 | module.exports = function extractVueScript(filename) { 5 | const source = fs.readFileSync(filename, 'utf8'); 6 | const parsedComponent = compiler.parse(source); 7 | const scriptContent = parsedComponent.descriptor.script ? parsedComponent.descriptor.script.content : ''; 8 | 9 | return scriptContent; 10 | }; 11 | -------------------------------------------------------------------------------- /lib/tags/vue-computed.js: -------------------------------------------------------------------------------- 1 | exports.name = 'vue-computed'; 2 | 3 | exports.options = { 4 | canHaveType: true, 5 | canHaveName: true, 6 | onTagged(doclet, tag) { 7 | doclet._isVueDoc = true; 8 | doclet._vueComputed = doclet._vueComputed || []; 9 | doclet._vueComputed.push(tag.value || {}); 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /lib/tags/vue-data.js: -------------------------------------------------------------------------------- 1 | exports.name = 'vue-data'; 2 | 3 | exports.options = { 4 | canHaveType: true, 5 | canHaveName: true, 6 | onTagged(doclet, tag) { 7 | doclet._isVueDoc = true; 8 | doclet._vueData = doclet._vueData || []; 9 | doclet._vueData.push(tag.value || {}); 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /lib/tags/vue-event.js: -------------------------------------------------------------------------------- 1 | exports.name = 'vue-event'; 2 | 3 | exports.options = { 4 | canHaveType: true, // type of event-payload 5 | canHaveName: true, // name of emitted event 6 | onTagged(doclet, tag) { 7 | doclet._isVueDoc = true; 8 | doclet._vueEvent = doclet._vueEvent || []; 9 | doclet._vueEvent.push(tag.value || {}); 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /lib/tags/vue-prop.js: -------------------------------------------------------------------------------- 1 | exports.name = 'vue-prop'; 2 | 3 | exports.options = { 4 | canHaveType: true, 5 | canHaveName: true, 6 | onTagged(doclet, tag) { 7 | doclet._isVueDoc = true; 8 | doclet._vueProps = doclet._vueProps || []; 9 | doclet._vueProps.push(tag.value || {}); 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /lib/templates/default.ejs: -------------------------------------------------------------------------------- 1 |

<%# Prematurely close JSDoc default template tags %> 2 | 3 | <% if(props.length > 0) { %> 4 |

Props

5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | <% props.forEach(function(prop) { %> 16 | 17 | 18 | 19 | 20 | 21 | <% }) %> 22 |
NameTypeDefault valueRequired?Description
<%- prop.name %><%- renderType(prop.type) %><%- typeof prop.defaultvalue === 'undefined' ? '-' : `${prop.defaultvalue}` %><%- prop.optional ? 'No' : 'Yes' %><%- typeof prop.description === 'undefined' ? '-' : prop.description %>
23 | <% } %> 24 | 25 | <% if(data.length > 0) { %> 26 |

Data

27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | <% data.forEach(function(d) { %> 37 | 38 | 39 | 40 | 41 | <% }) %> 42 |
NameTypeDefault valueDescription
<%- d.name %><%- renderType(d.type) %><%- typeof d.defaultvalue === 'undefined' ? '-' : `${d.defaultvalue}` %><%- typeof d.description === 'undefined' ? '-' : d.description %>
43 | <% } %> 44 | 45 | <% if(computed.length > 0) { %> 46 |

Computed

47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | <% computed.forEach(function(c) { %> 56 | 57 | 58 | 59 | <% }) %> 60 |
NameTypeDescription
<%- c.name %><%- renderType(c.type) %><%- typeof c.description === 'undefined' ? '-' : c.description %>
61 | <% } %> 62 | 63 | 64 | <% if(event.length > 0) { %> 65 |

Events

66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | <% event.forEach(function(c) { %> 75 | 76 | 77 | 78 | <% }) %> 79 |
NamePayload TypeDescription
<%- c.name %><%- renderType(c.type) %><%- typeof c.description === 'undefined' ? '-' : c.description %>
80 | <% } %> 81 | 82 |

<%# Re-open JSDoc template tags %> 83 | -------------------------------------------------------------------------------- /lib/templates/docstrap.ejs: -------------------------------------------------------------------------------- 1 |

<%# Prematurely close JSDoc default template tags %> 2 | 3 | <% if(props.length > 0) { %> 4 |

Props

5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | <% props.forEach(function(prop) { %> 16 | 17 | 18 | 19 | 20 | 21 | <% }) %> 22 |
NameTypeDefault valueRequired?Description
<%- prop.name %><%- renderType(prop.type) %><%- typeof prop.defaultvalue === 'undefined' ? '-' : `${prop.defaultvalue}` %><%- prop.optional ? 'No' : 'Yes' %><%- typeof prop.description === 'undefined' ? '-' : prop.description %>
23 | <% } %> 24 | 25 | <% if(data.length > 0) { %> 26 |

Data

27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | <% data.forEach(function(d) { %> 37 | 38 | 39 | 40 | 41 | <% }) %> 42 |
NameTypeDefault valueDescription
<%- d.name %><%- renderType(d.type) %><%- typeof d.defaultvalue === 'undefined' ? '-' : `${d.defaultvalue}` %><%- typeof d.description === 'undefined' ? '-' : d.description %>
43 | <% } %> 44 | 45 | <% if(computed.length > 0) { %> 46 |

Computed

47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | <% computed.forEach(function(c) { %> 56 | 57 | 58 | 59 | <% }) %> 60 |
NameTypeDescription
<%- c.name %><%- renderType(c.type) %><%- typeof c.description === 'undefined' ? '-' : c.description %>
61 | <% } %> 62 | 63 | <% if(event.length > 0) { %> 64 |

Events

65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | <% event.forEach(function(c) { %> 74 | 75 | 76 | 77 | <% }) %> 78 |
NamePayload TypeDescription
<%- c.name %><%- renderType(c.type) %><%- typeof c.description === 'undefined' ? '-' : c.description %>
79 | <% } %> 80 | 81 |

<%# Re-open JSDoc template tags %> 82 | -------------------------------------------------------------------------------- /lib/templates/minami.ejs: -------------------------------------------------------------------------------- 1 |

<%# Prematurely close JSDoc default template tags %> 2 | 3 | <% if(props.length > 0) { %> 4 |

Props

5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | <% props.forEach(function(prop) { %> 16 | 17 | 18 | 19 | 20 | 21 | <% }) %> 22 |
NameTypeDefault valueRequired?Description
<%- prop.name %><%- renderType(prop.type) %><%- typeof prop.defaultvalue === 'undefined' ? '-' : `${prop.defaultvalue}` %><%- prop.optional ? 'No' : 'Yes' %><%- typeof prop.description === 'undefined' ? '-' : prop.description %>
23 | <% } %> 24 | 25 | <% if(data.length > 0) { %> 26 |

Data

27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | <% data.forEach(function(d) { %> 37 | 38 | 39 | 40 | 41 | <% }) %> 42 |
NameTypeDefault valueDescription
<%- d.name %><%- renderType(d.type) %><%- typeof d.defaultvalue === 'undefined' ? '-' : `${d.defaultvalue}` %><%- typeof d.description === 'undefined' ? '-' : d.description %>
43 | <% } %> 44 | 45 | <% if(computed.length > 0) { %> 46 |

Computed

47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | <% computed.forEach(function(c) { %> 56 | 57 | 58 | 59 | <% }) %> 60 |
NameTypeDescription
<%- c.name %><%- renderType(c.type) %><%- typeof c.description === 'undefined' ? '-' : c.description %>
61 | <% } %> 62 | 63 | <% if(event.length > 0) { %> 64 |

Events

65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | <% event.forEach(function(c) { %> 74 | 75 | 76 | 77 | <% }) %> 78 |
NamePayload TypeDescription
<%- c.name %><%- renderType(c.type) %><%- typeof c.description === 'undefined' ? '-' : c.description %>
79 | <% } %> 80 | 81 |

<%# Re-open JSDoc template tags %> 82 | -------------------------------------------------------------------------------- /lib/templates/tui.ejs: -------------------------------------------------------------------------------- 1 |

<%# Prematurely close JSDoc default template tags %> 2 | 3 | 15 | 16 | <% if(props.length > 0) { %> 17 |

Props

18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | <% props.forEach(function(prop) { %> 30 | 31 | 32 | 33 | 34 | 35 | <% }) %> 36 |
NameTypeDefault valueRequired?Description
<%- prop.name %><%- renderType(prop.type) %><%- typeof prop.defaultvalue === 'undefined' ? '-' : `${prop.defaultvalue}` %><%- prop.optional ? 'No' : 'Yes' %><%- typeof prop.description === 'undefined' ? '-' : prop.description %>
37 |
38 | <% } %> 39 | 40 | <% if(data.length > 0) { %> 41 |

Data

42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | <% data.forEach(function(d) { %> 53 | 54 | 55 | 56 | 57 | <% }) %> 58 |
NameTypeDefault valueDescription
<%- d.name %><%- renderType(d.type) %><%- typeof d.defaultvalue === 'undefined' ? '-' : `${d.defaultvalue}` %><%- typeof d.description === 'undefined' ? '-' : d.description %>
59 |
60 | <% } %> 61 | 62 | <% if(computed.length > 0) { %> 63 |

Computed

64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | <% computed.forEach(function(c) { %> 74 | 75 | 76 | 77 | <% }) %> 78 |
NameTypeDescription
<%- c.name %><%- renderType(c.type) %><%- typeof c.description === 'undefined' ? '-' : c.description %>
79 |
80 | <% } %> 81 | 82 | <% if(event.length > 0) { %> 83 |

Events

84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | <% event.forEach(function(c) { %> 94 | 95 | 96 | 97 | <% }) %> 98 |
NamePayload TypeDescription
<%- c.name %><%- renderType(c.type) %><%- typeof c.description === 'undefined' ? '-' : c.description %>
99 |
100 | <% } %> 101 | 102 |

<%# Re-open JSDoc template tags %> 103 | -------------------------------------------------------------------------------- /lib/templates/utils/renderType.js: -------------------------------------------------------------------------------- 1 | const { htmlsafe } = require('jsdoc/lib/jsdoc/util/templateHelper'); 2 | 3 | module.exports = function renderTypes(type) { 4 | return ((type && type.names) || []).map(htmlsafe).join('|'); 5 | }; 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jsdoc-vuejs", 3 | "version": "0.0.0-development", 4 | "description": "A JSDoc plugin for documenting vue 3 files.", 5 | "main": "index.js", 6 | "files": [ 7 | "lib", 8 | "config.js" 9 | ], 10 | "scripts": { 11 | "test": "jest", 12 | "lint": "eslint --ext .js index.js config.js lib __tests__ cypress", 13 | "semantic-release": "semantic-release" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/Kocal/jsdoc-vuejs" 18 | }, 19 | "keywords": [ 20 | "jsdoc", 21 | "vuejs", 22 | "vue component", 23 | "vue file", 24 | "vue 3" 25 | ], 26 | "author": "Hugo Alliaume ", 27 | "license": "MIT", 28 | "bugs": { 29 | "url": "https://github.com/Kocal/jsdoc-vuejs/issues" 30 | }, 31 | "homepage": "https://github.com/Kocal/jsdoc-vuejs#readme", 32 | "engines": { 33 | "node": "^10.13.0 || >=12.0.0" 34 | }, 35 | "dependencies": { 36 | "ejs": "^3.0.1" 37 | }, 38 | "peerDependencies": { 39 | "jsdoc": ">=3.0.0", 40 | "@vue/compiler-sfc": ">= 3.0.0" 41 | }, 42 | "devDependencies": { 43 | "@kocal/semantic-release-preset": "^2.0.6", 44 | "@vue/compiler-sfc": "^3.1.4", 45 | "cypress": "^4.0.1", 46 | "eslint": "^6.2.0", 47 | "eslint-config-airbnb-base": "^14.0.0", 48 | "eslint-plugin-cypress": "^2.0.1", 49 | "eslint-plugin-import": "^2.13.0", 50 | "jest": "^24.0.0", 51 | "jsdoc": "^3.6.2", 52 | "semantic-release": "^17.1.1" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /screenshots/templates/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kocal/jsdoc-vuejs/e73bd4f74bfd9bf6f52d7a75579d416a44f73688/screenshots/templates/default.png -------------------------------------------------------------------------------- /screenshots/templates/docstrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kocal/jsdoc-vuejs/e73bd4f74bfd9bf6f52d7a75579d416a44f73688/screenshots/templates/docstrap.png -------------------------------------------------------------------------------- /screenshots/templates/minami.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kocal/jsdoc-vuejs/e73bd4f74bfd9bf6f52d7a75579d416a44f73688/screenshots/templates/minami.png -------------------------------------------------------------------------------- /screenshots/templates/tui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kocal/jsdoc-vuejs/e73bd4f74bfd9bf6f52d7a75579d416a44f73688/screenshots/templates/tui.png --------------------------------------------------------------------------------