JSDoc can generate API documents similar to JavaDoc, which is essential for front-end development.
Download jsdoc-tookit (http://code.google.com/p/jsdoc-toolkit/) and jsdoc-tookit-ant-task (http://code.google.com/p/jsdoc-toolkit-ant-task/), the escape Function of CSDN is problematic, so the angle brackets are replaced with the book name Number:
There are other similar tools. The DOC builder is essential to any mature front-end development team.
Xml Code
<Project default = "build-docs">
<Target name = "build-docs">
<Property name = "base" location = "."/>
<Taskdef name = "jsdoctoolkit" classname = "uk. co. darrenhurley. ant. tasks. jsDocToolkit "classpath =" jsdoc-toolkit-ant-task-1.1.0.jar; jsdoc-toolkit/java/classes/js. jar "/>
<Jsdoctoolkit template = "jsdoc" jsdochome = "$ {base}/jsdoc-toolkit/" outputdir = "$ {base}/output/">
<Source file = "portalone-common.js"/>
</Jsdoctoolkit>
</Target>
</Project>
JSLint is used for JavaScript code static check tool (http://jslint.com/), but this should not be open source; and need ruby runtime environment and gvim, and then with cscript engine, it is inconvenient to use. Online versions cannot be used in the project:
Eclipse has also developed the corresponding JSLint plugin, in addition, there is a very convenient tool jslint-toolkit (http://code.google.com/p/jslint-toolkit ):
Configure config. json first. The red font is the js directory to be checked:
Js Code
{
// JavaScript files to check
// "Includes": ["scripts // source", "scripts // jquery"],
"Includes": ["scripts // my"],
// Exclude files
"Excludes": [],
// Exclude file names (Regex expression)
"ExcludeNames": ["//. svn", "CVS"],
// Output directory
"OutPath": "out"
}
The output result is clear at a glance:
Author's "four-fire BLOG"