We are not going to do this officially (at least right now). Node is made for the server and it’s a lot in there that never will work on mobile. But we are going to help start an open source effort for something like this. Sometimes you need a web/browser shim and sometimes you need a NodeJS shim. So we will try to give you all the most common low level stuff so this will be possible through FuseJS. And FuseJS will also aim to have all the mobile spesific stuff you don’t find in browsers and Node.
You will probably notice some changes regarding this soon. The first is probably that the browser polyfills we already have in there, will become an optional package. So it will be easier to have a clean environment when you want Node stuff.
Hi Anders, Thanks for you quick response and ideas of where you are heading.
You will always have to look at the specifics of the node package to see what it is designed to achieve. For example cordova/phonegap has moved to NPM.
Having a common packaging solution makes it a lot easier for people to create and use existing functionality.
Thanks Again Peter
I can’t agree more with Peter.
Now as far as supporting NPM most of the packages on there should work as long as they don’t do anything node/browser specific like underscore/lodash should work in Fuse. (I don’t use those so I don’t know).
The reason they should work is because the way Fuse handles js. Fuse does the same thing Node does with js
require() to import a module. So as long as they do those things and don’t do anything platform specific they should work.
Edwin Yes you’re correct. I’m talking about fuse supporting npm and allowing access to a massive collection of modules. Peter
Peter Roden: You can sort of use npm with fuse already, and in we are adding even more convenience to streamline interop with npm. More info will be quite visible on our website when it launches.
This does however NOT mean that all node modules will just work, as Anders Bondehagen pointed out above, a lot of the modules only make sense on a server, or depend on other modules that do.
When is the npm support due to launch and how will I know when it does?
We are working on this right now, so if no blockers shows up, you should see something soon. We will definately highlight this. I will make sure you will be notified in some way Peter.
Just use Node as the backend, it’s really simple.