I've been using a very similar tool, browserify to do the same thing. The great thing about browserify is it already comes with core node.js library support, as well as an http module wrapper.
With tools like this, I love being able to modularize my client-side code using CommonJS modules and running JS test from the command line using tools like Vows and Buster.js. I also love being able to declare dependencies on npm modules. It's just as easy as testing and writing Ruby code with rubygems and rspec.
The only issue that still bothers me is that nearly every DOM querying/manipulating library out there assumes there's a global window or document object. This means I have to stub it out in any CLI tests I run and then make sure jquery or whatever is referencing a virtual window I create with jsdom instead of the global stub.
although onejs and browserify tries to accomplish similar tasks, onejs has some noticeable implementation and concept differences (e.g browserify pollutes global scope a lot and it expects you to provide it a main module instead of a package manifest)
here is the output comparison of onejs and browserify:
The second thing is, onejs lets us use the core NodeJS library, too. It doesn't contain it by default but you can install the available modules by typing; "one install assert path util url"
With tools like this, I love being able to modularize my client-side code using CommonJS modules and running JS test from the command line using tools like Vows and Buster.js. I also love being able to declare dependencies on npm modules. It's just as easy as testing and writing Ruby code with rubygems and rspec.
The only issue that still bothers me is that nearly every DOM querying/manipulating library out there assumes there's a global window or document object. This means I have to stub it out in any CLI tests I run and then make sure jquery or whatever is referencing a virtual window I create with jsdom instead of the global stub.
I have a few project using vows/npm/browserify for reference if anyone is interested. A FF/Chrome/Safari plugin: https://github.com/brighterplanet/careplane A simple SPI app: https://github.com/brighterplanet/hootroot1