grunt-extend-config
Grunt Plugin for Extending Grunt Configuration
Getting Started
This plugin requires Grunt ~0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-extend-config --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
Purpose
This Grunt extension is NOT a regular Grunt tasks. Instead it extends
the Grunt API with a single additional function: grunt.extendConfig(config: Object): void
.
This function is similar to the standard grunt.initConfig(config: Object): void
, but
allows you to incrementally establish the underlying grunt.config
object.
The intention is that this way you can better logically group all your task configurations.
Usage Example
Instead of writing...
// Gruntfile.jsmodule { grunt; grunt; grunt; grunt; grunt; grunt;};
...you can split the configurations and write...
// Gruntfile.jsmodule { grunt; grunt; grunt; // general task configurations grunt; grunt; // all configurations for building the libraries grunt; grunt; // all configurations for building the application grunt; grunt;};