Re:Grunt.js: Tips and Tricks
by ville on Tuesday January 21, 2014 @01:31PM
(#7097178)
The article suggests splitting the configuration in many parts using the grunt.config method. Another interesting way to organize it in a larger project is to define config for each task in a separate module. I first saw this used in React: https://github.com/facebook/react/blob/9182100/Gruntfile.js#...
[ Parent
| on HN ]
It's important to note that Grunt can be used in 2 (more?) ways:
1.) As a build tool
2.) As a continuous build tool (with watch and live reload)
React's Gruntfile is well organized and is a great option for #1.
However, use of this approach for #2 will cause a slower development process. Obviously, part of the performance hit could be offset by conditionally including only the files required for each task. However, reading files from disk will result in a slower reload.