1 | @daybrush/jsdoc [![npm version](https://badge.fury.io/js/%40daybrush%2Fjsdoc.svg)](https://badge.fury.io/js/%40daybrush%2Fjsdoc)
|
2 | =======
|
3 |
|
4 | ```bash
|
5 | npm install --save-dev @daybrush/jsdoc
|
6 | ```
|
7 |
|
8 | ## Support Typescript from version 0.3.0
|
9 | * [Scene.js Typescript API Documentation](https://daybrush.com/scenejs/release/latest/doc/index.html)
|
10 | * [@daybrush/utils Typescript API Documentation](https://daybrush.com/utils/release/latest/doc/index.html)
|
11 | * [InfiniteGrid Typescript API Documentation](https://naver.github.io/egjs-infinitegrid/release/latest/doc/)
|
12 |
|
13 | ### ```name``` and ```type``` can be omitted in function and method
|
14 | * jsdoc
|
15 | ```ts
|
16 | /**
|
17 | */
|
18 | function a(a: Parameter1, b: Parameter2): ReturnType {
|
19 | }
|
20 | ```
|
21 | * result
|
22 |
|
23 | ![](./images/function-result.png)
|
24 | ---
|
25 |
|
26 | ### ```extends``` and ```implements``` can be omitted from the class.
|
27 | * jsdoc
|
28 |
|
29 | ```ts
|
30 | /**
|
31 | */
|
32 | export class A extends B implements a {
|
33 | }
|
34 | ```
|
35 |
|
36 | * result
|
37 |
|
38 |
|
39 | ![](./images/class-result.png)
|
40 |
|
41 | ---
|
42 |
|
43 | ### Supports type declaration
|
44 | * jsdoc
|
45 | ```ts
|
46 | /**
|
47 | * @typedef
|
48 | */
|
49 | export type a<T> = () => T;
|
50 | ```
|
51 |
|
52 | * result
|
53 |
|
54 | ![](./images/type-result.png)
|
55 |
|
56 | ---
|
57 | ### Supports interface declaration
|
58 |
|
59 | * jsdoc
|
60 | ```ts
|
61 | /**
|
62 | * @typedef
|
63 | */
|
64 | export interface a {
|
65 | a: string;
|
66 | b: number;
|
67 | c: () => void;
|
68 | d(a: string, b: number): void;
|
69 | (a: string, b: number): void;
|
70 | [key: string]: any;
|
71 | }
|
72 | ```
|
73 |
|
74 | * result
|
75 |
|
76 |
|
77 | ![](./images/interface-result.png)
|
78 |
|
79 | ---
|
80 |
|
81 |
|
82 | ### jsdoc.json (Add ts extension to includePattern)
|
83 | ```json
|
84 | {
|
85 | "source": {
|
86 | "includePattern": ".+\\.(j|t)s(doc|x)?$",
|
87 | },
|
88 | }
|
89 | ```
|
90 |
|
91 |
|
92 | JSDoc 3
|
93 | =======
|
94 |
|
95 | [![Build Status](https://travis-ci.org/jsdoc3/jsdoc.svg?branch=master)](http://travis-ci.org/jsdoc3/jsdoc)
|
96 |
|
97 | An API documentation generator for JavaScript.
|
98 |
|
99 | Want to contribute to JSDoc? Please read `CONTRIBUTING.md`.
|
100 |
|
101 | Installation and Usage
|
102 | ----------------------
|
103 |
|
104 | JSDoc supports Node.js 4.2.0 and later. You can install JSDoc globally or in your project's
|
105 | `node_modules` folder.
|
106 |
|
107 | To install the latest version on npm globally (may require `sudo`; [learn how to fix
|
108 | this](https://docs.npmjs.com/getting-started/fixing-npm-permissions)):
|
109 |
|
110 | npm install -g jsdoc
|
111 |
|
112 | To install the latest version on npm locally and save it in your package's `package.json` file:
|
113 |
|
114 | npm install --save-dev jsdoc
|
115 |
|
116 | **Note**: By default, npm adds your package using the caret operator in front of the version number
|
117 | (for example, `^3.5.2`). We recommend using the tilde operator instead (for example, `~3.5.2`),
|
118 | which limits updates to the most recent patch-level version. See [this Stack Overflow
|
119 | answer](https://stackoverflow.com/questions/22343224) for more information about the caret and tilde
|
120 | operators.
|
121 |
|
122 | To install the latest development version locally, without updating your project's `package.json`
|
123 | file:
|
124 |
|
125 | npm install git+https://github.com/jsdoc3/jsdoc.git
|
126 |
|
127 | If you installed JSDoc locally, the JSDoc command-line tool is available in `./node_modules/.bin`.
|
128 | To generate documentation for the file `yourJavaScriptFile.js`:
|
129 |
|
130 | ./node_modules/.bin/jsdoc yourJavaScriptFile.js
|
131 |
|
132 | Or if you installed JSDoc globally, simply run the `jsdoc` command:
|
133 |
|
134 | jsdoc yourJavaScriptFile.js
|
135 |
|
136 | By default, the generated documentation is saved in a directory named `out`. You can use the
|
137 | `--destination` (`-d`) option to specify another directory.
|
138 |
|
139 | Run `jsdoc --help` for a complete list of command-line options.
|
140 |
|
141 | Templates and Tools
|
142 | -------------------
|
143 |
|
144 | The JSDoc community has created numerous templates and other tools to help you generate and
|
145 | customize your documentation. Here are just a few:
|
146 |
|
147 | ### Templates
|
148 |
|
149 | + [jaguarjs-jsdoc](https://github.com/davidshimjs/jaguarjs-jsdoc)
|
150 | + [DocStrap](https://github.com/docstrap/docstrap) ([example](https://docstrap.github.io/docstrap))
|
151 | + [jsdoc3Template](https://github.com/DBCDK/jsdoc3Template)
|
152 | ([example](https://github.com/danyg/jsdoc3Template/wiki#wiki-screenshots))
|
153 | + [minami](https://github.com/Nijikokun/minami)
|
154 | + [docdash](https://github.com/clenemt/docdash) ([example](http://clenemt.github.io/docdash/))
|
155 | + [tui-jsdoc-template](https://github.com/nhnent/tui.jsdoc-template) ([example](https://nhnent.github.io/tui.jsdoc-template/latest/))
|
156 |
|
157 | ### Build Tools
|
158 |
|
159 | + [JSDoc Grunt plugin](https://github.com/krampstudio/grunt-jsdoc)
|
160 | + [JSDoc Gulp plugin](https://github.com/mlucool/gulp-jsdoc3)
|
161 |
|
162 | ### Other Tools
|
163 |
|
164 | + [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown)
|
165 | + [Integrating GitBook with
|
166 | JSDoc](https://medium.com/@kevinast/integrate-gitbook-jsdoc-974be8df6fb3)
|
167 |
|
168 | For More Information
|
169 | --------------------
|
170 |
|
171 | + Documentation is available at [Use JSDoc](http://usejsdoc.org).
|
172 | + Contribute to the docs at [jsdoc3/jsdoc3.github.com](https://github.com/jsdoc3/jsdoc3.github.com).
|
173 | + [Join JSDoc's Slack channel](https://jsdoc-slack.appspot.com/).
|
174 | + Ask for help on the [JSDoc Users mailing list](http://groups.google.com/group/jsdoc-users).
|
175 | + Post questions tagged `jsdoc` to [Stack
|
176 | Overflow](http://stackoverflow.com/questions/tagged/jsdoc).
|
177 |
|
178 | License
|
179 | -------
|
180 |
|
181 | JSDoc 3 is copyright (c) 2011-present Michael Mathews <micmath@gmail.com> and the [contributors to
|
182 | JSDoc](https://github.com/jsdoc3/jsdoc/graphs/contributors).
|
183 |
|
184 | JSDoc 3 is free software, licensed under the Apache License, Version 2.0. See the file `LICENSE.md`
|
185 | in this distribution for more details.
|