Node.js

832 views
Skip to first unread message

Bjorn Tipling

unread,
Jan 10, 2011, 12:30:18 PM1/10/11
to Closure Library Discuss
Everyone at Cloudkick is pretty excited about Node. A couple of us
(not me) have contributed to Node.js development. We have started to
develop projects built around it for powerful server tools. We're also
looking at things like socket.io to replace orbited on our front-end
and replacing twisted services with Node. Personally, I have started
using Node + Express instead of Django for my own projects.

I wish I could use Closure Library with Node. Obviously a lot that's
in the Closure Library doesn't make sense to have, such as goog.ui,
goog.xhrio, etc, but the event handler system, the tools for objects
and arrays, testing tools are things I miss when I'm developing with
Node.

I think a couple of things would be needed to get Closure Library
working with Node:

Detecting if the context is Node
Updating the goog.require to make it compatible with Node require
Figuring out support for exports
Adding tests.
Soy template support for Node.js. (Maybe belongs in the other project
discussion group, this stuff all bleeds over each other)

It might be entirely possible that the Closure Library as is
incompatible with the Node context, I have only looked a little so far
but will take a more in depth look soon.

Thoughts?

Carsten Kraus

unread,
Jan 10, 2011, 12:42:49 PM1/10/11
to closure-lib...@googlegroups.com

miel...@gmail.com

unread,
Feb 12, 2011, 1:47:22 PM2/12/11
to closure-lib...@googlegroups.com
With node-goog you may get into troubles using soy...

It uses uncompiled closure library and should work well in development. Loading code compiled in SIMPLE mode is a trivial task with node vm, to use ADVANCED_OPTIMIZATIONS you would need to create exports for node API.

Regards,
Łukasz

Guido Tapia

unread,
Feb 14, 2011, 3:52:33 PM2/14/11
to Closure Library Discuss
Hehehe,

I'll throw another out there:
https://github.com/gatapia/node-goog

This version has support for:
Libraries
Compiler
Linter
JSDoc
Closure Unit Tests

I'll be making the formal announcement for this lib late this week /
early next once I sort out a couple of minor issues still remaining in
the testing framework.

Thanks All

Guido

miel...@gmail.com

unread,
Feb 14, 2011, 4:11:45 PM2/14/11
to closure-lib...@googlegroups.com
Cool : ) Seems you guys have a name clash...

BTW. Where can I find some live JsDoc's from jsdoc-toolkit online?

Guido Tapia

unread,
Feb 14, 2011, 8:44:50 PM2/14/11
to Closure Library Discuss
I renamed the project to nclosure:
https://github.com/gatapia/nclosure

The wikis are the best place to get going with jsdoc:
http://code.google.com/p/jsdoc-toolkit/

However do a google, theres plenty of resources around for jsdoc
documenting your site.

And it may be interesting for you but the nclosure project uses a
custom jsdoc-toolkit that was converted to run on Node.js by Aaron
Wirtz and I'm making it async so it should be lightning fast very
soon.
:)
Reply all
Reply to author
Forward
0 new messages