1 | # JSDoc
|
2 |
|
3 | [![Build Status](https://travis-ci.org/jsdoc/jsdoc.svg?branch=master)](http://travis-ci.org/jsdoc/jsdoc)
|
4 |
|
5 | An API documentation generator for JavaScript.
|
6 |
|
7 | Want to contribute to JSDoc? Please read `CONTRIBUTING.md`.
|
8 |
|
9 | Installation and Usage
|
10 | ----------------------
|
11 |
|
12 | JSDoc supports stable versions of Node.js 8.15.0 and later. You can install
|
13 | JSDoc globally or in your project's `node_modules` folder.
|
14 |
|
15 | To install the latest version on npm globally (might require `sudo`;
|
16 | [learn how to fix this](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally)):
|
17 |
|
18 | npm install -g jsdoc
|
19 |
|
20 | To install the latest version on npm locally and save it in your package's
|
21 | `package.json` file:
|
22 |
|
23 | npm install --save-dev jsdoc
|
24 |
|
25 | **Note**: By default, npm adds your package using the caret operator in front of
|
26 | the version number (for example, `^3.6.3`). We recommend using the tilde
|
27 | operator instead (for example, `~3.6.3`), which limits updates to the most
|
28 | recent patch-level version. See
|
29 | [this Stack Overflow answer](https://stackoverflow.com/questions/22343224) for
|
30 | more information about the caret and tilde operators.
|
31 |
|
32 | To install the latest development version locally, without updating your
|
33 | project's `package.json` file:
|
34 |
|
35 | npm install git+https://github.com/jsdoc/jsdoc.git
|
36 |
|
37 | If you installed JSDoc locally, the JSDoc command-line tool is available in
|
38 | `./node_modules/.bin`. To generate documentation for the file
|
39 | `yourJavaScriptFile.js`:
|
40 |
|
41 | ./node_modules/.bin/jsdoc yourJavaScriptFile.js
|
42 |
|
43 | If you installed JSDoc globally, run the `jsdoc` command:
|
44 |
|
45 | jsdoc yourJavaScriptFile.js
|
46 |
|
47 | By default, the generated documentation is saved in a directory named `out`. You
|
48 | can use the `--destination` (`-d`) option to specify another directory.
|
49 |
|
50 | Run `jsdoc --help` for a complete list of command-line options.
|
51 |
|
52 | ## Templates and tools
|
53 |
|
54 | The JSDoc community has created templates and other tools to help you generate
|
55 | and customize your documentation. Here are a few of them:
|
56 |
|
57 | ### Templates
|
58 |
|
59 | + [jaguarjs-jsdoc](https://github.com/davidshimjs/jaguarjs-jsdoc)
|
60 | + [DocStrap](https://github.com/docstrap/docstrap)
|
61 | ([example](https://docstrap.github.io/docstrap))
|
62 | + [jsdoc3Template](https://github.com/DBCDK/jsdoc3Template)
|
63 | ([example](https://github.com/danyg/jsdoc3Template/wiki#wiki-screenshots))
|
64 | + [minami](https://github.com/Nijikokun/minami)
|
65 | + [docdash](https://github.com/clenemt/docdash)
|
66 | ([example](http://clenemt.github.io/docdash/))
|
67 | + [tui-jsdoc-template](https://github.com/nhnent/tui.jsdoc-template)
|
68 | ([example](https://nhnent.github.io/tui.jsdoc-template/latest/))
|
69 | + [better-docs](https://github.com/SoftwareBrothers/better-docs)
|
70 | ([example](https://softwarebrothers.github.io/admin-bro-dev/index.html))
|
71 |
|
72 | ### Build tools
|
73 |
|
74 | + [JSDoc Grunt plugin](https://github.com/krampstudio/grunt-jsdoc)
|
75 | + [JSDoc Gulp plugin](https://github.com/mlucool/gulp-jsdoc3)
|
76 |
|
77 | ### Other tools
|
78 |
|
79 | + [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown)
|
80 | + [Integrating GitBook with
|
81 | JSDoc](https://medium.com/@kevinast/integrate-gitbook-jsdoc-974be8df6fb3)
|
82 |
|
83 | ## For more information
|
84 |
|
85 | + Documentation is available at [jsdoc.app](https://jsdoc.app/).
|
86 | + Contribute to the docs at
|
87 | [jsdoc/jsdoc.github.io](https://github.com/jsdoc/jsdoc.github.io).
|
88 | + [Join JSDoc's Slack channel](https://jsdoc-slack.appspot.com/).
|
89 | + Ask for help on the
|
90 | [JSDoc Users mailing list](http://groups.google.com/group/jsdoc-users).
|
91 | + Post questions tagged `jsdoc` to
|
92 | [Stack Overflow](http://stackoverflow.com/questions/tagged/jsdoc).
|
93 |
|
94 | ## License
|
95 |
|
96 | JSDoc 3 is copyright (c) 2011-present Michael Mathews <micmath@gmail.com> and
|
97 | the [contributors to JSDoc](https://github.com/jsdoc/jsdoc/graphs/contributors).
|
98 |
|
99 | JSDoc 3 is free software, licensed under the Apache License, Version 2.0. See
|
100 | the file `LICENSE.md` in this distribution for more details.
|