GithubHelp home page GithubHelp logo

jsdoc's Introduction

JSDoc 3

An inline API documentation processor for JavaScript. JSDoc 3 is intended to be an upgrade to JsDoc Toolkit (JSDoc 2).

Notice

This is pre-release software! It is under active development, not complete and is not suitable for reqular use yet.

Installation

Download a copy of JSDoc 3 from the official Git Hub repository here: https://github.com/micmath/jsdoc

To build the jar file that runs JSDoc 3, use the Apache ant build tool:

cd jsdoc
ant

This will create a file named jsdoc.jar in the project base directory.

To test that the newly installed app is working, execute the following:

java -jar jsdoc.jar --test

Usage

This example assumes that your working directory is the jsdoc application base directory:

java -jar jsdoc.jar yourSourceCodeFile.js

For help regarding the supported commandline options use the --help option.

java -jar jsdoc.jar --help

Included with JSDoc 3 is a bash shell script that can simplify the command line usage slightly. For example:

./jsdoc --help
./jsdoc yourSourceCodeFile.js

Dependencies

JSDoc 3 utilises the Mozilla Rhino engine, which requires Java. JSDoc 3 is known to work with version 1.6.0_24 of Java.

JSDoc 3 uses advanced features in the Rhino application which are only available in or after Rhino 1.7 release 3. A copy of this version of Rhino is included in JSDoc so this is not normally an issue that the user needs to be concerned with. However, in rare cases, users may have their Java CLASSPATH configured to override that included Rhino and point to some older version of Rhino instead. If this is the case, simply correct the CLASSPATH to remove the older Rhino.

The build script for JSDoc 3 requires Apache ant. It is know to work with version 1.8.2 of ant.

Debugging

Rhino is not always very friendly when it comes to reporting errors in JavaScript. Luckily it comes with a full-on debugger included that can be much more useful than a simple stack trace. To invoke JSDoc with the debugger try the following command:

$ java -classpath build-files/java/classes/js.jar \
org.mozilla.javascript.tools.debugger.Main main.js `pwd` \
your/script.js

This will open a debugging window. Choose "Break on Exceptions" from the "Debug" menu, then press the "Run" button. If there is an error, you should see exactly where it is in the source code.

See Also

Project Documentation: http://usejsdoc.org/ (under development) JSDoc User's Group: http://groups.google.com/group/jsdoc-users Subversion Mirror: http://code.google.com/p/jsdoc/source Project Annoncements: http://twitter.com/jsdoc3

License

JSDoc 3 is copyright (c) 2011 Michael Mathews [email protected]

See file "LICENSE.md" in this distribution for more details about terms of use.

jsdoc's People

Contributors

micmath avatar novemberborn avatar

Stargazers

malcolm player avatar

Watchers

malcolm player avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.