Giter Club home page Giter Club logo

jsduck's Introduction

JsDuck

API documentation generator for Sencha JavaScript frameworks.

JsDuck aims to be a better documentation generator for Ext JS than the old ext-doc was. It is used by Sencha to document Ext JS 4, Sencha Touch and several other products.

The highlights of JSDuck are Markdown support and keeping you DRY by inferring a lot of information from code. Read the Guide for full overview.

New to JSDuck? Watch introductory talk by Nick Poulden:

SenchaCon 2011 JSDuck talk

Getting it

Standard rubygems install should do:

$ [sudo] gem install jsduck

If you encounter errors during gem installation, you may need to install the header files for compiling extension modules for ruby 1.8. For Debian systems you'll need the ruby1.8-dev package. For Red Hat / CentOS / Fedora use the ruby-devel package.

For Windows users out there, you can download the binary version, which includes Ruby interpreter and all dependencies bundled in a single .exe file. Grab it from the download page.

Usage

For the simplest test-run just use the --builtin-classes option to automatically produce documentation for JavaScript builtin classes like Array, String and Object:

$ jsduck --builtin-classes --output your/docs

You can also use --verbose option to see what's actually happening.

To generate docs for Ext JS 4 add path to the corresponding src/ dir:

$ jsduck ext-4.0.7/src \
         --builtin-classes \
         --images ext-4.0.7/docs/images \
         --output your/docs

The --images option specifies a path for images included with {@img} tags inside the source code.

To generate docs for your own project, simply name additional input directories:

$ jsduck ext-4.0.7/src project1/js project2/js ...

Note that the resulting documentation will only contain the API documentation. Guides, videos and examples will not be present. These can be added using more command line options as explained in the Advanced Usage section of wiki.

Running latest JSDuck is expected to generate lots of warnings. That's because some warning types were added after Ext JS 4.0.7 release. Sorry for that, JSDuck just wants to be helpful. If you are overwhelmed by the warnings, you can disable them selectively using something like --warnings=-link_ambiguous,-no_doc or you could disable them all by --warnings=-all.

Another thing that often happens is that JSDuck is unable to determine into which class a member belongs and will place all such items into a global class - you can disable this using the --ignore-global switch. For full list of all command line options type jsduck --help=full.

Hacking it

See Hacking guide in wiki.

Documenting your code

All the supported syntax is described in the Guide. For quick overview take a look at example.js.

Copying

JsDuck is distributed under the terms of the GNU General Public License version 3.

JsDuck was developed by Rene Saarsoo, with many contributions from Nick Poulden.

Thanks to Ondřej Jirman, Thomas Aylott, johnnywengluu, gevik, ligaard, Bill Hubbard, Ed Spencer, atian25, Katherine Chu, Rob Dougan and many-many others who reported bugs, submitted patches, and provided a lot of useful input.

Changelog

See Changelog page in wiki.

jsduck's People

Stargazers

 avatar

Watchers

 avatar  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.