How do I use JSDoc on Windows?

前端 未结 3 508
有刺的猬
有刺的猬 2021-02-02 16:12

Forgive me if this is a daft question but I\'m utterly baffled as to how I can use JSDoc on Windows. I\'m aware of JSDoc-Toolkit but it\'s a bit out of date and the google code

相关标签:
3条回答
  • 2021-02-02 16:16

    You can download it as an npm package for the Node.js JavaScript runtime environment.

    1. Install Node.js which comes with npm
    2. Open your a command line
    3. Install JsDoc by typing the following command

      npm install -g jsdoc

    4. Run JsDoc / generate documentation. more info

      jsdoc path/to/file.js

    5. Configure jsdoc (Optional)

    0 讨论(0)
  • 2021-02-02 16:18

    The installation is not good documented on the project-page.

    It is much better exlained on the github-page.

    0 讨论(0)
  • 2021-02-02 16:31

    I'm not saying this is necessarily the best way, but it worked for me:

    1. Install node.js

    2. Open a command prompt

    3. As a test, create a folder in your root drive (c:\test) and go to it (cd\test). I guess there was some sort of permission issue as I couldn't get the following steps to work in my desktop folder.

    4. Install the JSDoc package: npm install jsdoc

    5. There should be a folder in test called node_modules

    6. Go to the .bin subfolder in node_modules

    7. There should be a file called jsdoc.cmd. Simple use jsdoc myfile.js in the command prompt to execute the JSDoc script on your file

    0 讨论(0)
提交回复
热议问题