[ 6 posts ]

vijetha Shetty

  • Username: vijetha
  • Joined: Tue Nov 03, 2009 8:36 am
  • Posts: 4
  • GitHub: vijetha
  • Gists: vijetha
  • IRC: vijetha
  • Offline
  • Profile

How to generate YUI API doc for normal js files

Post Posted: Tue Nov 03, 2009 10:15 pm
+0-
I would like to know is it necessary to follow a module pattern to generate a YUI API doc, like without using the @class tag.Since i am a newbie to this i started using this from yesterday only so please someone help me on this
Fo example my js file begins like this

var somevariable=true;
function foo(a1,a2)
{
some code
}
i would like to know how can i write a yui doc for such a file without using the class tag.

Thanks in advance :D

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2016
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: How to generate YUI API doc for normal js files

Post Posted: Wed Nov 04, 2009 1:51 am
+0-
The yuiDoc does not read your code, it reads your doc comments, the ones starting with /** and all the @ arguments in them.

vijetha Shetty

  • Username: vijetha
  • Joined: Tue Nov 03, 2009 8:36 am
  • Posts: 4
  • GitHub: vijetha
  • Gists: vijetha
  • IRC: vijetha
  • Offline
  • Profile

Re: How to generate YUI API doc for normal js files

Post Posted: Wed Nov 04, 2009 2:18 am
+0-
Ok....Then one more question for the code whatever i specified which tag i can use, if I use @method tag I am getting error like @method defined before @class, can anyone please suggest me like which tag will be proper.

Thanks
Vijetha

vijetha Shetty

  • Username: vijetha
  • Joined: Tue Nov 03, 2009 8:36 am
  • Posts: 4
  • GitHub: vijetha
  • Gists: vijetha
  • IRC: vijetha
  • Offline
  • Profile

Re: How to generate YUI API doc for normal js files

Post Posted: Wed Nov 04, 2009 4:10 am
+0-
Actually i just wanted to know whether we able to write yuidoc for the procedural javascript code.


Thanks,
Vijetha

Adam Moore

YUI Contributor

  • Username: adam
  • Joined: Wed Sep 03, 2008 11:16 am
  • Posts: 356
  • GitHub: apm
  • Gists: apm
  • Offline
  • Profile

Re: How to generate YUI API doc for normal js files

Post Posted: Wed Nov 04, 2009 10:23 am
+0-
Yes you can. And the error message from your previous post is telling you what the problem is -- methods need to be associated with a class. If these functions do not belong to a class, define one anyway in a comment block above your methods (something like /** global functions @class GLOBAL **/).

vijetha Shetty

  • Username: vijetha
  • Joined: Tue Nov 03, 2009 8:36 am
  • Posts: 4
  • GitHub: vijetha
  • Gists: vijetha
  • IRC: vijetha
  • Offline
  • Profile

Re: How to generate YUI API doc for normal js files

Post Posted: Wed Nov 04, 2009 8:46 pm
+0-
@Adam :Thanks a lot, it is working :P
  [ 6 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum