Configure grunt with a directory of task configuration files.
grunt-configure supports loading a group of configuration files for more organized Grunt configuration!
- Clean separation of task configuration.
- User overrides for a specific task will be deep merged and kept in a separate file, this means user overrides can be ignored by version control systems.
- Support for JSON.
- Support for YAML.
npm install grunt-configure
You call into grunt-configure with a mini match regular expression to select which files you want to construct your configuration from.
If this directory had a file called lint.js it would use the export value of that module and the key
lint for the configuration. If someone had a user version, suffixed by a -user (this can be configured) it would deep merge with the lint.
The constructed configuration would look like this:
Available options are
cwd from which to load the file paths from and
-user doesn't fit your fancy. An example of changing the suffix:
Now files with that suffix, like "lint-override.js", will be used for the override.