0.0.9 • Published 3 years ago

cem-plugin-jsdoc-example v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

cem-plugin-jsdoc-example

Adds (non-standard) "jsdoc-example" flag to class fields

Example

custom-elements-manifest.config.js

import { jsdocExamplePlugin } from 'cem-plugin-jsdoc-example';

export default {
  plugins: [
    jsdocExamplePlugin(),
  ]
}

thing-doer.js

/**
 * @element thing-doer
 * @example Do a thing
 * ```html
 * <thing-doer></thing-doer>
 * ```
 */
export class ThingDoer { }

Output

{
  "schemaVersion": "1.0.0",
  "readme": "",
  "modules": [
    {
      "kind": "javascript-module",
      "path": "thing-doer.js",
      "declarations": [
        {
          "kind": "class",
          "description": "## Examples\n\n### Do a thing\n```html\n<thing-doer></thing-doer>\n```",
          "name": "ThingDoer",
          "tagName": "thing-doer",
          "customElement": true
        }
      ],
      "exports": [
        {
          "kind": "js",
          "name": "ThingDoer",
          "declaration": {
            "name": "ThingDoer",
            "module": "thing-doer.js"
          }
        }
      ]
    }
  ]
}
0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago