maven-jsduck is a Maven plugin that produces JavaScript API documentation using jsduck.
It uses JRuby to run; the lib directories of jsduck version 3.10.5 and its dependencies are unrolled in src/main/resources.
The Markdown implementation used by jsduck is RDiscount which is written in C; this was replaced by a native java implementation (markdownj) to allow for better portability and performance.
Get
$ git clone git://github.com/pguedes/maven-jsduck.git
Install
$ cd maven-jsduck/maven-jsduck
$ mvn install
Run
$ cd ~/myproject
$ mvn jsduck:jsduck
Clean
$ mvn jsduck:clean-jsduck
parameter | description | default |
---|---|---|
verbose | Enable or disable more logging. | true |
source | Directories containing the javascript files to document. | |
javascriptDirectory | The directory containing the JavaScript files to document. | src/main/webapp/js |
targetDirectory | The directory to write the API documentation to. | target/jsduck-api |
welcome | The welcome page to use. | src/main/jsduck/welcome.html |
title | The title to use for the documentation. | ${project.name} ${project.version} |
header | The header to use for the documentation. | ${project.name} ${project.version} API |
guides | The guides to include | |
egIframe | Sample iframe for running inline examples |
To change the configuration while running command line use the plugin name as prefix: -Djsduck.verbose=false.
To automatically run the clean-jsduck goal during clean add the following to your pom.xml:
<build>
<plugins>
<plugin>
<groupId>nl.secondfloor.mojo.jsduck</groupId>
<artifactId>jsduck-maven-plugin</artifactId>
<executions>
<execution>
<phase>clean</phase>
<goals>
<goal>clean-jsduck</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>false</verbose>
</configuration>
</plugin>
</plugins>
</build>
- Embed javadoc documentation in the same documentation browser to have a full API documentation pack
- Figure out how Atlassian generated their JIRA REST/HTTP API doc and find a way to incorporate something like that as well
- (Update) appears to be xslt on jersey's wadl output with some additional javadoc tag support
- Investigate if it is possible to do delta generation to sync the API doc with the current state instead of having to clean and regenerate
- Wrap jsduck logging in the maven plugin's log framework
- Allow usage of customized templates.