jsdoc/README.md
Jeff Williams 7761292b97 use nicer typography in the default template (#780)
Squashed commit of the following:

commit eb310340ae542152ae5fd15b070e389a17b71913
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Wed Nov 5 17:24:19 2014 +0000

    Updated to use the same set of monospace typefaces as MDN too.

commit 5ff2591f8c3711e20f87eeb2e41347396d201414
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Wed Nov 5 17:15:28 2014 +0000

    Add font re-generation instructions to the README.

commit bb4502a308936a31684732104b09ae737e6fbaec
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Wed Nov 5 16:11:06 2014 +0000

    Added additional variations of the OpenSans typeface.

commit 125f2c91e767c7fa853ffa3222e7ed7d02f027b8
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Wed Nov 5 15:33:44 2014 +0000

    Moved the web fonts into a separate 'fonts' directory.

commit 968998c677a946e79910b96cff2cb4c29898eb48
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Wed Nov 5 15:24:46 2014 +0000

    Removed a negative margin hack we no longer seem to need.

commit 82f96d67cd3067ba6fd3deadee13e8853eb58491
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Wed Nov 5 15:13:15 2014 +0000

    Removed the 'Summary' heading, plus re-jigged the formatting so there isn't too much space before the content.

commit db9dfad5c2339ea6d36a400b59da0447d446920d
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Wed Nov 5 14:23:05 2014 +0000

    Fix for styling that was incorrectly being applied to each item in a list, rather than to the list itself.

commit 774271bd4e74ea429df7e5ae8fb9473097b81a1b
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Wed Nov 5 14:14:04 2014 +0000

    For consistency, ensure there is always a space after the colon used to delimit CSS rule pairs.

commit 88d59794b0442e594bedf6fb17a638923ac67c2a
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Wed Nov 5 14:07:31 2014 +0000

    Replace tabs with spaces to be consistent with the remainder of the stylesheet.

commit 37e5043403441a19cbe0cf2e2f4dec8ceba6cacb
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Wed Nov 5 14:02:34 2014 +0000

    Use the same color for headings that MDN does.

commit 8f925659efd7a6c9996bf2a8dcebb174f79dc8d8
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Fri Aug 22 09:46:41 2014 +0100

    Accidentally missed from previous check-in.

commit e98b060822b018c1403b98c92400052565d69e20
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Fri Aug 22 09:46:11 2014 +0100

    Updated the license to reflect the inclusion of the Open Sans typeface,
    plus included EOT and SVG versions of the font so that older version of
    IE and Android browser also get to see the page rendered correctly.

commit 7e1a581bca931603e738e5afc238e7f211c9d444
Author: Dominic Chambers <dominic.chambers@gmail.com>
Date:   Thu Aug 21 14:32:02 2014 +0100

    Rebased the template typography off of the Mozilla Developer Network
    site so generated API docs have a more contemporary and familiar style.
2014-11-05 16:48:09 -08:00

4.6 KiB

JSDoc 3

Build Status

An API documentation generator for JavaScript.

Want to contribute to JSDoc? Please read CONTRIBUTING.md.

Installation and Usage

You can run JSDoc on either Node.js or Mozilla Rhino.

Node.js

Native support for Node.js is available in JSDoc 3.3.0 and later. JSDoc supports Node.js 0.10 and later.

Installing JSDoc for Node.js

You can install JSDoc in your project's node_modules folder, or you can install it globally.

To install the latest alpha version:

npm install jsdoc@"<=3.3.0"

To install the latest development version:

npm install git+https://github.com/jsdoc3/jsdoc.git

Running JSDoc with Node.js

If you installed JSDoc locally, the JSDoc command-line tool is available in ./node_modules/.bin. To generate documentation for the file yourJavaScriptFile.js:

./node_modules/.bin/jsdoc yourJavaScriptFile.js

Or if you installed JSDoc globally, simply run the jsdoc command:

jsdoc yourJavaScriptFile.js

By default, the generated documentation is saved in a directory named out. You can use the --destination (-d) option to specify another directory.

Run jsdoc --help for a complete list of command-line options.

Mozilla Rhino

All versions of JSDoc 3 run on a customized version of Mozilla Rhino, which requires Java. You can run JSDoc 3 on Java 1.6 and later.

Installing JSDoc for Mozilla Rhino

To install JSDoc, download a .zip file for the latest development version or a previous release.

You can also use git to clone the JSDoc repository:

git clone git+https://github.com/jsdoc3/jsdoc.git

The JSDoc repository includes a customized version of Mozilla Rhino. Make sure your Java classpath does not include any other versions of Rhino. (On OS X, you may need to remove the file ~/Library/Java/Extensions/js.jar.)

Note: In JSDoc 3.3.0 and later, if you need to run JSDoc on Mozilla Rhino, do not install JSDoc with npm. Use one of the methods described above.

Running JSDoc with Mozilla Rhino

On OS X, Linux, and other POSIX systems, to generate documentation for the file yourJavaScriptFile.js:

./jsdoc yourJavaScriptFile.js

Or on Windows:

jsdoc yourJavaScriptFile.js

By default, the generated documentation is saved in a directory named out. You can use the --destination (-d) option to specify another directory.

Run jsdoc --help for a complete list of command-line options.

Templates and Build Tools

The JSDoc community has created numerous templates and other tools to help you generate and customize your documentation. Here are just a few:

Templates

Build Tools

Generating Typeface Fonts

JSDoc 3 uses the OpenSans typeface, the fonts for which can be re-generated as follows:

  1. Open the OpenSans page at Font Squirrel.
  2. Click on the 'Webfont Kit' tab.
  3. Either leave the subset drop-down as 'Western Latin (Default)', or if we decide we need more glyphs than change it to 'No Subsetting'.
  4. Click the 'DOWNLOAD @FONT-FACE KIT' button.
  5. For each typeface variant we plan to use, copy the 'eot', 'svg' and 'woff' files into the 'templates/default/static/fonts' directory.

For More Information

License

JSDoc 3 is copyright (c) 2011-2014 Michael Mathews micmath@gmail.com and the contributors to JSDoc.

JSDoc 3 is free software, licensed under the Apache License, Version 2.0. See the file LICENSE.md in this distribution for more details.