-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
47 lines (43 loc) · 1.1 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
/*
** Normally we would use dist folder for distribution code
** but since we are coming from the java world - "target" folder
** is more relevant to us. (default output folder of a maven job)
**
** grunt clean => mvn clean
**
*/
module.exports = (grunt) => {
grunt.initConfig({
env: {
test: {
DEBUG: "evolvus-docket*"
}
},
mochaTest: {
test: {
options: {
reporter: "spec",
},
src: ["test/index.js"]
}
},
jshint: {
options: {
"esversion": 6
},
files: {
src: ["gruntfile.js", "index.js", "db/*.js", "test/index.js", "test/**/*.js", "model/*.js"]
}
},
watch: {
files: ["<%= jshint.files.src %>"],
tasks: ["jshint", "mochaTest"]
}
});
grunt.loadNpmTasks("grunt-env");
grunt.loadNpmTasks("grunt-mocha-test");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-watch");
//grunt.registerTask("ci-build", ["clean", "jshint", "copy", "mochaTest:coverage"]);
grunt.registerTask("default", ["jshint", "env:test", "mochaTest"]);
};