grunt-require-config

Keep Gruntfile simple, stupid.

Downloads
13.7K
Stars
3
Committers
1

grunt-require-config

Keep Gruntfile simple, stupid.

Getting Started

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-require-config --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-require-config');

Run this task with the grunt require_config command.

Usage Examples

$ ls ./grunt
  jshint.js
  trash.js

Gruntfile.js

 module.exports = function(grunt) {
   'use strict';
   grunt.initConfig({
     require_config: {
       all: {
         options: {
           ignore: ['grunt/trush']
         },
         src: ['grunt']
       }
     }
   });
   grunt.loadNpmTasks('grunt-require-config');
   grunt.registerTask('default', ['require_config', 'jshint']);
 };

grunt/jshint.js

module.exports = {
  all: [
    'src/*.js'
  ]
};

Properties

src

  • Type: Array || String
  • Require directories

Options

ignore

  • Type: Array
  • Default: []
  • Require ignore files