danyg / jsdoc3Template

A custom Customizable JSDOC3 template
38 stars 23 forks source link

Integration with ANT #7

Open danyg opened 11 years ago

danyg commented 11 years ago

I think that must be helpful explain how to integrate this template with ANT.

xorcus commented 10 years ago

I am successfully running jsdoc3 using rhino from Ant as follows (no need for a special ant plugin): <exec executable="path/to/jsdoc/jsdoc.cmd" dir="path/to/jsdoc"> <arg value="--recurse" /> <arg value="--destination" /> <arg value="path/to/docs/output/dir" /> <arg value="--template" /> <arg value="templates/default" /> <arg value="path/to/base/dir/where/js/files/are/kept" /> </exec>

I finally made it work with arbitrary templates. The trick was to execute the command in the jsdoc directory (see dir attribute of exec tag), so path to a desired template supplied following --template is relative to this directory (e.g. templates/default, or templates/jsdoc3Template-master)

Note that path to jsdoc3 template is actually path to a directory where publish.js is found. This is indeed the base directory for templates/jsdoc3Template, but in case of other templates, may be a subdirectory there of (e.g. templates/docstrap/template)

danyg commented 10 years ago

I will test it, and tell you something.

Thanks

xorcus commented 10 years ago

I have updated the comment above and the example