A Java Doclet based tool for importing Java source code comments to markdown for Presidium documentation.
Supports a limited subset of javadoc tags. Additional support is under development.
- Requires Java JDK 8+ to run
This tool can be run as a:
- Standalone executable
- Javadoc Doclet
usage: presidium-javadoc
Option | Description |
---|---|
-d,--directory path |
The destination directory to save the generated documentation to. default: './docs' |
-h,--help | Shows this help. |
-p,--subpackages package1:package2:... |
Packages to generate documentation from. default: all |
-s,--sourcepath path |
Java source code directory. |
-t,--title string |
Reference title. default: 'javadoc' |
-u,--url foo/bar/{title-slug} |
Section url. default: 'reference/javadoc' |
-d,--directory path |
The destination directory to save the generated documentation to. default: './docs' |
-h,--help | Shows this help. |
-p,--subpackages package1:package2:... |
Packages to generate documentation from. default: all |
-s,--sourcepath path |
Java source code directory. |
-t,--title string |
Reference title. default: 'javadoc' |
-u,--url foo/bar/{title-slug} |
Section url. default: 'reference/javadoc' |
This tool provides a subset of the standard java doclet and can be built using javadoc
and the -doclet option:
$ javadoc -sourcepath <src-path> -doclet net.spandigital.presidium.Doclet -docletpath presidium-javadoc-#.#.#.jar -d <dist-path> -subpackages <packages>
Include a custom doclet with the gradle javadoc task
Include as part of the npm build building your Presidium site as in the following sample:
"scripts": {
"import-javadoc-api" : "presidium-javadoc -s <src-path> -d content/_reference/javadoc-api -p <packages> -t Javadoc\ API -u reference/javadoc-api"
},
"devDependencies": {
"presidium-javadoc" : "#.#.#"
}
To build and run locally:
Uses the gradle application plugin:
gradle installDist
Installs to: build/install/presidium-javadoc
$ gradle installDist
$ cd build/install/presidium-javadoc
$ npm publish
TODO