javascript - JS doc with ant -
I'm trying to get an ant to run my jsdoc toolkit. After creating my build.xml from the site, I end up with it:
& lt; Taskdef name = "jsdoctoolkit" classname = "uk.co.darrenhurley.ant.tasks.jsDocToolkit" classpath = "/ jsdoc / jsrun.jar; /jsdoc/java/classes/js.jar" /> As I run #ant, I get the following error: /pathto/jsdoc_toolkit-2.3.2 / Build Xml: 1: I'm just a Java developer as an unexpected element "{} taskdef" {antlib: org.apache.tools.ant} taskdef
I can only guess That's my classname (which I have taken from the website) is wrong. But now I have to find out where it is to replace it.
Can anyone help me with it?
I do not have much luck jsdoctoolkit work is either working Fortunately this JSDoc toolkit is easy to run directly from ant without using the work.
& lt; Property name = "source.dir" value = "source" /> & Lt; Property Name = "doc.dir" value = "Docs" /> & Lt; Property Name = "tool.dir" value = "tools" / & gt; & Lt; Property Name = "jsdoctoolkit.dir" value = "$ {tool.dir} /jsdoc_toolkit-2.4.0/jsdoc-toolicate" /> & Lt; Target name = "docs" description = "generates documentation" & gt; & Lt; Sequential & gt; & Lt; Delete dir = "$ {doc.dir}" /> & Lt; Mkdir dir = "$ {doc.dir}" /> & Lt; Echo message = "running JSD toolkit" /> & Lt ;! - java exe is said to run in dir where our source files are. If we run away from the DIR rather than the build file that provides the full path to the source files, then the documentation will include the full file system path instead of the relative (c: \ path \ to \ source \) since this command source Running in Dye, all the paths given after this will have to go below one level (../) for the first time so that they can return to the build file dior. - & gt; & Lt; Exec executable = "java" dir = "$ {source.dir}" & gt; & Lt; Arg line = "- jar ../$ {jsdoctoolkit.dir} /jsrun.jar ../$ {jsdoctoolkit.dir} /app/run.js" /> & Lt ;! -d JSDoc tells the toolkit where the output of the document is - & gt; & Lt; Arg line = "- d = .. / $ {doc.dir}" /> & Lt ;! - Use default template - & gt; & Lt; Arg line = "- t = .. / $ {jsdoctoolkit.dir} / templates / jsdoc" /> & Lt ;! - Create an RGR element for each file that you want to include in the document - & gt; & Lt; Arg line = "my-javascript-file.js" /> & Lt; Arg line = "other- javascript-file.js" /> & Lt; Arg rows = "subdir / now-second-javascript-file.js" /> & Lt; / Executive & gt; & Lt; / Sequential & gt; & Lt; / Target & gt;
This goal assumes that the project has the following directory structure:
build.xml docs / source / my-javascript-file.js is another- Javascript -file.js subdir / yet-second-javascript-file.js tool / jsdoc_toolkit-2.4.0 / jsdoc-toolkit / jsrun.js app / run.js
Comments
Post a Comment