This project has moved and is read-only. For the latest updates, please go here.

Reading comments from non Atlas type JavaScript

Apr 16, 2009 at 11:58 AM
Hi,

I've got a few doxen JS files which need documenting and I'm struggling to get this working on just a few of them.

The JS files contain code along the lines of:

function doSomething(val1, val2)
{
/// <summary>
/// Does something
/// </summary>
/// <param name="val1">The first value.</param>
/// <param name="val2">The second value.</param>
/// <returns>Returns the division of the <paramref="val1"/> and <paramref="val2">.</returns>
return -1;
}

 

String.prototype.someStub = function()
{
/// <summary>
/// Some Stub
/// </summary>
/// <returns>Returns true.</returns>
return true;
}

and

if (!window.$myNS)
{
window.$myNS = new Array();
window.$myNS.SomeFunction = new function() { // do something }

 

 

 

It's not possible to change all the code but I still want to extract the comments into a usable form.
Is this possible with AjaxDoc?  If so, how can I get this to work as I'm not getting anything out from the tool.

The project file resembles:

 

<?

 

xml version="1.0" encoding="utf-8" ?>

 

<

 

project xmlns:scriptdoc="http://www.w3.org/2001/XMLSchema-instance"

 

 

 

 

 

scriptdoc:noNamespaceSchemaLocation="ScriptDocProject.xsd">

 

<

 

scripts>

 

 

 

<script path="ScriptLibrary/scripts/myScriptTest.js"/>

 

</

 

scripts>

 

<

 

namespaces>

 

<

 

namespace></namespace>

 

 

 

<namespace>$myNS</namespace>

 

 

 

</namespaces>

 

<

 

singletons>

 

<

 

singleton>$myNS</singleton>

 

 

 

</singletons>

 

</

 

project>


Please advise.

Thanks,

Andy