D
D
Deliaz2015-11-12 14:59:18
Node.js
Deliaz, 2015-11-12 14:59:18

How to remove extra stuff from node_modules and bower_components?

Friends,
I am doing a project on node webkit. When assembled, the package is over 130 MB.
I want to shrink a little by removing unnecessary from the rep: tests, all sorts of screenshots, readmishki, sorts and other things that are not necessary for production (look at the jquery and bootstrap packages for an example, in addition to the dist folder is still full).
Any ideas on how to do it by hand?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Aves, 2015-11-12
@Deliaz

https://github.com/KyleRoss/modclean there is such a thing, I really haven’t tried it myself.

A
Andrey Mensky, 2015-11-12
@men232

If the question is: How to remove old/unused modules? I think the grandfather's method will do - delete the node_modules folder and run npm i.
If everything is much more serious and you need to collect exactly the files that you use? You should use assemblers like gulp. I think these modules will help you:
- gulp-inject
- gulp-useref

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question