How would I go about cleaning the node_modules folder when prepping my code for deployment.
I am making an app using node-webkit and would prefer to include the least amount of files possible when bundling the final version of the app as the unzip process takes some time.
I've looked at
npm install --production
Well cleaning the
node_modules for the deployment for a webkit application, its kind of difficult, because of the modules inside
node_modules directory are installed with or without test files other misc files and so, if the owner of the module, has declared an
.npmignore file with dir/files such as
examples those will be excluded from packaging process when the owner publishes his module, but it will exist in the repository (git) as normal.
the above is left in module owners hands, if he/she "forgets" to make one, then package will contain pretty much everything.
socket.io-clientit doesn't mean you have to
npm install socket.io --save-dev, a simple
npm install socket.io -Vwould install the production package as it was uploaded by its owner.
grunttask, to clean your entire
node_modulesas you would like it to be.
a couple of rules would be
builddirectories (not sure about it might contain some binaries sometimes that are necessary)