This repository was archived by the owner on Sep 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathGruntfile.js
More file actions
54 lines (49 loc) · 1.32 KB
/
Gruntfile.js
File metadata and controls
54 lines (49 loc) · 1.32 KB
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
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",
"app.js",
"test/**/*.js",
"lib/**/*.js",
"app/dev/**/*.js",
"app/http/*.js",
"app/lib/*.js",
"app/http/controllers/*.js",
"app/http/public/js/*.js",
"app/http/views/js/*.ejs",
"app/db/**/*.js"
];
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
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-jshint");
grunt.loadNpmTasks("grunt-jsbeautifier");
grunt.loadNpmTasks("grunt-jscs");
grunt.registerTask("clean", ["jsbeautifier:modify"]);
grunt.registerTask("validate", ["jsbeautifier:verify", "jshint", "jscs"]);
grunt.registerTask("default", ["validate"]);
};