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 tests
or examples
those will be excluded from packaging process when the owner publishes his module, but it will exist in the repository (git) as normal.
Exclude test code in npm package?
the above is left in module owners hands, if he/she "forgets" to make one, then package will contain pretty much everything.
Note that since you don't use the
development
package of socket.io
or socket.io-client
it doesn't mean you have to npm install socket.io --save-dev
, a simple npm install socket.io -V
would install the production package as it was uploaded by its owner.
A possible workaround would be to make a
grunt
task, to clean your entire node_modules
as you would like it to be.
a couple of rules would be
test
ortests
directory or*test*.js
filesbuild
directories (not sure about it might contain some binaries sometimes that are necessary)history.md
Hope i helped somehow, also take a look at Tilemill and how they deploy their application.