Search code examples
gruntjsgulpbuild-automationprepros

Why do Grunt/Gulp plugins take up so much space?


I have been using Prepros over the last few months to compile, minifiy, build etc. my projects. But I have found that it is, at times, quite clunky or isn't as customizable as I would like. So I am trying to find a more complex, stable and customizable build system. So have played around with both and love how customizable it is, but the size of the plugins that live inside the project are massive being on some projects 70+ mb of plugins.

So how come I can't just install my most used dependencies locally, since I am always working on multiple projects and these plugins folders will start to add up over time. Also, is there a way to have the flexibility of grunt or Gulp without having this large amount space taken up with plugins.


Solution

  • So how come I can't just install my most used dependencies locally

    You can just install your dependencies locally. However, if you want to reuse development dependencies across all your projects you may want to consider installing them globally.

    If you were to use Node.js and the node package manager npm you would be able to do just that. You can run Gulp and Grunt effortlessly from there.

    Now, I am guessing that you are not really concerned about 70 Mb worth of plugins as most, if not all in my case, are just tools that I use to build my web app.

    It seems to me that the itch to have full power over your development environment has gotten under your skin. In that case welcome to the club. My recommendation would be to use Bower as your app dependencies manager and npm as your development dependencies manager.

    FYI: My node_modules folder is up to 140 Mb and it will probably grow as I use more and more tools. My bower_components folder is up to 43 Mb. From there I use angular and a bunch of angular modules, bootstrap, font-awesome, lodash and others. My debugging deployment size is 23 Mb. That's shockingly big right? Well, after all my optimization, minification, concatenation, obfuscation and so on my release/dist size is 2 Mb with 1.2 Mb worth of images and fonts.