forked from demand-consults/demand_acep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
45 lines (39 loc) · 994 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
37
38
39
40
41
42
43
44
45
//gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
watch: {
test: {
files: ['**/*.py'],
tasks: ['shell:test'],
options: {
cwd: {
files: 'demand_acep/'
}
}
},
doc: {
files: ['**/*.rst'],
tasks: ['shell:make'],
options: {
cwd: {
files: 'doc/'
}
}
}
},
shell: {
test: {
command: 'coverage run --source=demand_acep -m pytest . --disable-warnings -s'
},
make: {
command: 'cd doc && make html'
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-shell');
grunt.registerTask('default', ['watch:test']);
grunt.registerTask('doc', ['watch:doc']);
};
// Add task called 'pylint', different from 'default' to perform pylint on saving
// try this : https://stackoverflow.com/a/52336149/1328232