I love Grunt. Each project I’ve done last year I’ve used it to automate linting, building, testing, etc. There’s just one thing which keeps on bothering me: once a project grows, so does the grunt file. I just keep on finding new grunt plugins and adding them to my projects. With every plugin, task configuration and declarations are added to the Grunt file and its size just keeps on growing, making it very messy and hard to maintain IMO.
TL;WR (too long;won’t read)
We’re having a discussion on the best way to manage large grunt files in this thread of the yeoman generator-webapp project. Let us know what you think!
So, what’s it all about?
To me, the best way to manage grunt task configurations is by splitting it all up into several files.
I wrote a module load-grunt-configs which loads your grunt task configuration objects from files in a directory.