Mike Lischke Mike Lischke - 5 months ago 53
Node.js Question

How to enable node-gyp parallel builds?

In my node module I use larger library in source code which takes a while to compile. I believe this has to do with the

setting used by default by node-gyp. Now I wonder if it is possible to make node-gyp compile cpp files in parallel to speed up this process. I couldn't find anything that would help on the GYP format reference page. Is there a setting for my project gyp file or a hack for node-gyp?


Simply add this to your package.json file:

"scripts": {
  "install": "node-gyp rebuild -j 8"