Registry / devops / rollup-plugin-jsdoc

rollup-plugin-jsdoc

JSON →
library0.1.2jsnpmunverified

A Rollup plugin that wraps JSDoc to generate API documentation during the build process. Version 0.1.2 is the latest release and appears to be in early development with low release cadence. It passes JSDoc CLI options through Rollup, allowing integration of documentation generation into the build pipeline. Differentiators: minimalistic, no magic, direct JSDoc configuration.

npm install rollup-plugin-jsdoc
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-JSDO
R
rollup-plugin-jsdoc
devopsjavascriptv0.1.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

jsdoc
✓ import jsdoc from 'rollup-plugin-jsdoc'
✗ const jsdoc = require('rollup-plugin-jsdoc');
Package does not export a CommonJS default; use ESM import.
jsdoc
✓ const { default: jsdoc } = require('rollup-plugin-jsdoc');
✗ const jsdoc = require('rollup-plugin-jsdoc');
If using CommonJS, destructure default export.
default
✓ import jsdoc from 'rollup-plugin-jsdoc'
✗ import { jsdoc } from 'rollup-plugin-jsdoc'
The plugin is a default export, not named.

Shows how to integrate the plugin into a Rollup config to generate JSDoc documentation in the 'docs' folder.

// rollup.config.js import jsdoc from 'rollup-plugin-jsdoc'; export default { input: 'src/index.js', output: { file: 'dist/bundle.js', format: 'cjs' }, plugins: [ jsdoc({ args: ['-d', 'docs'], config: 'jsdoc.config.json' }) ] };
Debug
Known issues
gotchaDo not use '-c' or '--configure' in 'args' – use the 'config' option instead.
fix
Move configuration file path to the 'config' option.
affects: >=0.0.0
gotchaJSDoc must be installed separately as a devDependency.
fix
Run: npm install -D jsdoc
affects: >=0.0.0
deprecatedPlugin is in early stage and may have breaking changes without major version bump.
fix
Pin version with exact version or use lockfile.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'jsdoc'
JSDoc not installed as dependency.
fix
npm install -D jsdoc
TypeError: jsdoc is not a function
Incorrect import style (named import instead of default).
fix
import jsdoc from 'rollup-plugin-jsdoc'
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
jsdocoptionalcore functionality - JSDoc is the documentation generator being wrapped
rollupoptionalpeer dependency – required to use as a Rollup plugin
Agent activity
12 hits · last 30 days
node
11
Resources
rollup-plugin-jsdoc — npm install rollup-plugin-jsdoc · libregistry