I think if all .js files could be well-documented, describing all 
methods, inheriting etc like javadoc and every new release 
(or every snapshot if it's possible) we make two directories of source
code, one documented and one comment-free and white space-
stripped to save size. Something like a build-system.

Then it would be easy for a developer to develop against the 
commented version and use a generated reference and when 
everything is done and working, just change the src-directory to 
the build-directory and everything should work as before but  saving 
X kb.

Dan did a Makefile-program to do something like this, search for 
"makefile" in the archives
http://www.mail-archive.com/dynapi-dev%40lists.sourceforge.net/
to find out more. this was actually why the "js/"-directory was renamed
to "src/" as it's name is today. (the js-directory was meant to contain
compressed .js files)

/martin

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]] On Behalf Of 
> Richard Bennett
> Sent: den 15 november 2001 00:47
> To: Laszlo Teglas; [EMAIL PROTECTED]
> Subject: Re: [Dynapi-Dev] Documentation Project
> 
> 
> > I thought about this myself. I like the idea since this 
> would document our
> > code as well as create the html docs.
> And the documentation is always up to date with the current code, - a
> cronjob can be set daily for instance.
> 
> > This has two downsides however:
> > 1) In Java you can afford to comment your source as much as 
> you like,
> > because the compiler strips out the comments, and your 
> comments don't
> affect
> > the file size and performance of the byte code. In 
> JavaScript however we
> > have to be conscious of the size of our source comments, as 
> they are not
> > striped out before they are downloaded. Thus this effects 
> performance
> 
> Dan made a Perl comment-stripper, that would run online, 
> there were still
> some bugs though.
> And Thomas Loo made a script one, very cool called ESC, I'm 
> not sure where
> it is online, his email was:
> [EMAIL PROTECTED]
> This is exactly why we are ending all lines with semi-colons 
> in the script.
> 
> >
> > 2) You have to build a doc compiler. This is a project of 
> its own. I don't
> > think we have the resources for that.
> Oxygen is really cool, works in windows, or Linux. It's 
> touted for C C++,
> but with a little tweaking will work ok with Javascript.
> sample output:
> http://www.richardinfo.com/examples/Richardinfo_Developer_Docs/
> 
> http://www.stack.nl/~dimitri/doxygen/index.html.
> 
> 
> Cheers,
> Richard.
> 
> 
> 
> 
> 
> ----- Original Message -----
> From: "Laszlo Teglas" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, November 14, 2001 11:41 PM
> Subject: RE: [Dynapi-Dev] Documentation Project
> 
> 
> > I thought about this myself. I like the idea since this 
> would document our
> > code as well as create the html docs.
> >
> > This has two downsides however:
> > 1) In Java you can afford to comment your source as much as 
> you like,
> > because the compiler strips out the comments, and your 
> comments don't
> affect
> > the file size and performance of the byte code. In 
> JavaScript however we
> > have to be conscious of the size of our source comments, as 
> they are not
> > striped out before they are downloaded. Thus this effects 
> performance
> >
> > 2) You have to build a doc compiler. This is a project of 
> its own. I don't
> > think we have the resources for that.
> >
> > NanoFace =;^)
> >
> > -----Original Message-----
> > From: Matt Fair [mailto:[EMAIL PROTECTED]]
> > Sent: November 14, 2001 4:39 PM
> > To: Laszlo Teglas
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [Dynapi-Dev] Documentation Project
> >
> >
> > Are we thinking of puting together source documentation 
> like what java
> > has with its javadocs?
> > A javadoc style would be:
> > /**
> >  I put my documentation here for this method
> >  example: foo bar
> > */
> > FooBar.prototype.foo=function() {
> > ...
> > }
> >
> > We could put together a web-based documentation compiler.
> >
> > just some thoughts.
> > Matt
> >
> >
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> > http://www.mail-archive.com/[email protected]/
> >
> 
> 
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://www.mail-archive.com/[email protected]/
> 


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[email protected]/

Reply via email to