Load a directory of grunt configurations. Very similar to load-grunt-tasks but for configuration.
Want to see pretty graphs? Log in now!
npm install require-grunt-configs
|4||downloads in the last day|
|16||downloads in the last week|
|110||downloads in the last month|
|Last Published By|
|Version||0.5.0 last updated 2 months ago|
|Keywords||gruntplugin, grunt-config, load-grunt-tasks, require, load, matchdep, configuration|
Load a directory of grunt configurations. I wrote this because even a trivial grunt configuration can look a bit unwieldy as one huge file. Check out the before and after examples to understand the benefit.
Keep your main Gruntfile clean by extracting configuration into individual files. The name of the file is the same as the task name. For example, the
grunt jshint configuration would go into
grunt/jshint.js while the
grunt concat configuration would go into
Check out these examples for a more in-depth look at how this works.
% npm install require-grunt-configs --save-dev
require-grunt-configs loads files from the
grunt directory; however, you may prefer a more organized directory structure (as do I) such as the one below:
grunt └── conf ├── concat.js └── jshint.js └── notify.js └── pkg.js └── sass.js └── uglify.js └── watch.js
In order to load the above configuration files, in your Gruntfile add:
Explore the directory grunt/conf to view the contents of the example configuration files listed above.
- load-grunt-config: does a lot more than configuration.
- grunt-configure: I wasn't comfortable with the LOC and dependency list given the task.
- how @cowboy modularizes Gruntfiles: uses tasks for external config -- I will be exploring this approach for future projects.