Re: [nodejs] JAR like format for nodejs

2016-10-23 Thread Matt
Aside from the other tips, have you considered using a filesystem that supports transparent compression? I have no idea what system you are deploying to, but NTFS, ZFS and Btrfs support this. On Thu, Oct 13, 2016 at 10:12 AM, Jan Flyborg wrote: > Hi, > > I am wondering if

Re: [nodejs] JAR like format for nodejs

2016-10-22 Thread Jan Flyborg
I did not know that it was that easy to plug in new functionality in the module loader. With this new information it seems very doable to package an application with Rollup (and have the benefit of their tree-shaking and other goodies), and then write a new module loader that can load the few

Re: [nodejs] JAR like format for nodejs

2016-10-22 Thread Jan Flyborg
Thanks for the tip. This gives me like a 25% reduction in size for our project which is very valuable to us. Cheers //Jan fre 21 okt. 2016 kl 20:25 skrev Alain Mouette : > You could try > Npm dedupe > > - > Alain Mouette > > A 13 de outubro de 2016 11:44:06

Re: [nodejs] JAR like format for nodejs

2016-10-21 Thread Jeremy Darling
Since you can overload the way that Require works you don't actually need a "change" to Node you can just add in your own loader, as an example here is a very simple YAML loader: const fs = require('fs'); const yaml = require('js-yaml'); require.extensions['.yaml'] = require.extensions['.yml'] =

Re: [nodejs] JAR like format for nodejs

2016-10-21 Thread Alain Mouette
You could try Npm dedupe - Alain Mouette A 13 de outubro de 2016 11:44:06 Jan Flyborg escreveu: Hi, I am wondering if there are any plans to change the module system of nodejs to make it able to import modules from a single archive (much like Java's jar which

[nodejs] JAR like format for nodejs

2016-10-13 Thread Jan Flyborg
Hi, I am wondering if there are any plans to change the module system of nodejs to make it able to import modules from a single archive (much like Java's jar which actually is a zip in disguise). We are planning on deploying code on a space constrained device and since our node_module folder is