Hacker News new | past | comments | ask | show | jobs | submit login

That approach may fit the need of a modularity but it doesn't solve the remaining issues. To me, the most important issue is to make both backend and frontend dependencies same.

I haven't documented yet but there is something I'm working on for a while, OneJS. It generates a single, stand-alone JavaScript file, not requiring coder to make any change on a CommonJS code. The built file it generates can be run at any platform that doesn't support CommonJS, such as web browsers. It means that we can use the great dependency mechanism NPM provides in our frontend apps.

For those who wonders, OneJS; https://github.com/azer/onejs

Example project; https://github.com/azer/onejs/tree/master/test/example-proje...

Output of the above example project; https://gist.github.com/1286969

A relatively larger example; https://github.com/azer/multiplayerchess.com/tree/master/fro...




Well, you've got some stiff competition. :) See: http://blog.brianbeck.com/post/10667967423/node-js-require-i...

Is there something that differentiates your approach? I do actually think there's room for improvement in these libraries, so I'm genuinely curious.


The basic reason behind my motivation is that I'm looking for a simple solution developed for the all javascript environments with no commonjs support, not only web browsers. Besides of it, it's better to have same dependencies in both backend and frontend, taking advantage of using NPM. Imagine a test script that should be run by both NodeJS and Internet Explorer 6. What is the current most low-cost way to do it?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: