-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
31 lines (24 loc) · 1.09 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
require('babel-register');
process.traceDeprecation = true;
module.exports = function (grunt) {
// Load per-task config from separate files in folder '/grunt'.
grunt.loadTasks('grunt');
// QA
grunt.registerTask('unit', ['mochaTest:build']);
grunt.registerTask('hint', ['eslint']);
grunt.registerTask('test', ['continue:on', 'hint', 'unit', 'continue:off']);
// Build
grunt.registerTask('git', ['githash', 'json_generator']);
grunt.registerTask('build:dev', ['webpack:dev']);
grunt.registerTask('build:prod', ['webpack:build']);
// migration
grunt.registerTask('migrate', ['execute:migration']);
// target for production after deployment
grunt.registerTask('postinstall', ['copy:build', 'build:prod']);
// dev -> monitor changes and restart
grunt.registerTask('monitor', ['nodemon:build']);
// dev -> build and monitor parallel for local development without a docker container
grunt.registerTask('startDev', ['migrate', 'git', 'concurrent:buildAndRun']);
// default -> test
grunt.registerTask('default', ['test', 'watch:test']);
};