Skip to content

Main Index

Constants

generate

Generate Markdown Files

Orchestrates the process of reading, filtering, and writing files.

  • options: The plugin options of type PluginOptions.

Functions

plugin(options)Plugin

Vitepress JSDoc Plugin.

generate

Generate Markdown Files

Orchestrates the process of reading, filtering, and writing files.

  • options: The plugin options of type PluginOptions.

Kind: global constant
Example

typescript
generate(myCliArgs);
generate(myCliArgs);

plugin(options) ⇒ Plugin

Vitepress JSDoc Plugin.

Kind: global function
Returns: Plugin - Returns a Vite plugin object.

ParamTypeDescription
optionsPluginOptionsThe options for the plugin.

Example

typescript
// Example Vitepress Configuration
import { defineConfig } from "vitepress";
import VitpressJsdocPlugin from "vitepress-jsdoc";

export default defineConfig({
  vite: {
    plugins: [
      VitpressJsdocPlugin({
        folder: "code",
        source: "./dist/mjs/",
        dist: "./docs",
        title: "API",
        partials: ["./dist/mjs/partials/*.hbs"],
        helpers: ["./dist/mjs/helpers/*.js"],
        readme: "./README.md",
        exclude: "**\/*.json,**\/*.hbs,**\/*.d.js,**\/*.map,**\/interfaces.*",
      }),
    ],
  },
});
// Example Vitepress Configuration
import { defineConfig } from "vitepress";
import VitpressJsdocPlugin from "vitepress-jsdoc";

export default defineConfig({
  vite: {
    plugins: [
      VitpressJsdocPlugin({
        folder: "code",
        source: "./dist/mjs/",
        dist: "./docs",
        title: "API",
        partials: ["./dist/mjs/partials/*.hbs"],
        helpers: ["./dist/mjs/helpers/*.js"],
        readme: "./README.md",
        exclude: "**\/*.json,**\/*.hbs,**\/*.d.js,**\/*.map,**\/interfaces.*",
      }),
    ],
  },
});

Released under the MIT License.