-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathGruntfile.js
executable file
·58 lines (51 loc) · 1.36 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
module.exports = function (grunt) {
var jsbeautifyrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jsbeautifyrc");
var jscsrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jscsrc");
var jshintrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jshintrc");
var javaScriptFiles = [
"Gruntfile.js",
"server.js",
"lib/**/*.js",
"public/js/*.js",
"routes/**/*.js",
"test/**/*.js"
];
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
csslint: {
files: [
"public/gallery/**/*.css",
"public/stylesheets/search.css"
]
},
jshint: {
options: jshintrc,
files: javaScriptFiles
},
jsbeautifier: {
options: {
js: jsbeautifyrc
},
modify: {
src: javaScriptFiles
},
verify: {
src: javaScriptFiles,
options: {
mode: "VERIFY_ONLY"
}
}
},
jscs: {
src: javaScriptFiles,
options: jscsrc
}
});
grunt.loadNpmTasks("grunt-contrib-csslint");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-jsbeautifier");
grunt.loadNpmTasks("grunt-jscs");
grunt.registerTask("clean", ["jsbeautifier:modify"]);
grunt.registerTask("validate", ["jsbeautifier:verify", "jshint", "jscs", "csslint"]);
grunt.registerTask("default", ["validate"]);
};