-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathgruntfile.js
29 lines (25 loc) · 868 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
module.exports = function(grunt) {
var moduleName = "ui";
var loadConfig = function (name, module) {
var result = {};
module = module || moduleName || "module";
name = name.indexOf(".") > -1 ? name : name + ".conf";
result[module] = require("./config/" + name + ".js");
return result;
};
grunt.initConfig({
webpack: {
default: loadConfig("webpack")['ui'],
docs: loadConfig("webpack-docs")['ui']
},
watch: loadConfig("watch"),
karma: loadConfig("karma"),
eslint: loadConfig("eslint")
});
grunt.registerTask("docs", ["webpack:docs"]);
grunt.registerTask("build", ["webpack:default", "docs"]);
grunt.registerTask("default", ["build"]);
require('load-grunt-tasks')(grunt, {
pattern: ['grunt-*', "!grunt-cli"]
});
};