Is it possible to generate a JSDoc documentation in IDEA / WebStorm with one click, just like I do JavaDoc with IntelliJ IDEA.
1 Answers
TL;DR:
To add a functionality of the JSDoc documentation generation to IntelliJ IDEA / WebStorm:
Install
jsdoc
to the Node.js project:npm i jsdoc
Prepare a JSDoc configuration file (
jsdoc.json
) and store it in the root of the projectGo to File | Settings | Tools | External Tools in IntelliJ IDEA / WebStorm
Add a new external tool called Generate JSDoc… of group Documentation.
In Tool Settings provide the following parameters:
Program: path to the Node.js binary, e.g.:
C:\Program Files\nodejs\node.exe
Arguments: path to JSDoc scripts and to the JSDoc config (
jsdoc.json
), e.g.:$ProjectFileDir$/node_modules/jsdoc/jsdoc.js -c $ProjectFileDir$/jsdoc.json
Here it is possible either specify absolute paths or provide a relative path using IDE's internal command$ProjectFileDir$
Working directory: path to the sources, e.g.:
$ProjectFileDir$\src
Press OK and Apply
Now, go to Tools → Documentation → Generate JSDoc…, et voilà, the JSDoc is generated and stored according to the JSDoc config (jsdoc.json
).
P.S. This guide is tested on IntelliJ IDEA 2021.2.

- 14,010
- 29
- 101
- 161