🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

cem-plugin-jsdoc-example

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cem-plugin-jsdoc-example

Handle JSDoc @example tag

latest
Source
npmnpm
Version
0.0.9
Version published
Maintainers
1
Created
Source

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

Keywords

custom-elements-manifest

FAQs

Package last updated on 23 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts