forked from m14t/boondocking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
36 lines (27 loc) · 895 Bytes
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* global module, require */
var _ = require('lodash');
var _matchdep = require('matchdep');
module.exports = function(grunt) {
'use strict';
function mergeConfigFiles(userConfig) {
var config = {};
var files = grunt.file.expand('Gruntfile.d/*.json');
files.map(grunt.file.readJSON).forEach(function(entry) {
_.merge(config, entry);
});
//-- merge in the user's config last so it has the highest precedence
_.merge(config, userConfig);
return config;
}
var config = {
//-- Put your project specific config variables here!
pkg: grunt.file.readJSON('package.json')
};
config = mergeConfigFiles(config);
grunt.initConfig(config);
//-- Load plugins.
_matchdep.filter('grunt-*').forEach(grunt.loadNpmTasks);
grunt.registerTask('default', [
'watch'
]);
};