cem-plugin-jsdoc-example
TypeScript icon, indicating that this package has built-in type declarations

0.0.9 • Public • Published

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"
          }
        }
      ]
    }
  ]
}

Package Sidebar

Install

npm i cem-plugin-jsdoc-example

Weekly Downloads

154

Version

0.0.9

License

MIT

Unpacked Size

7.56 kB

Total Files

4

Last publish

Collaborators

  • bennyp