forked from mozilla/web-ext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
54 lines (45 loc) · 1.14 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
/*eslint prefer-template: 0*/
module.exports = function(grunt) {
// Looking for something?
// The source of a grunt task or its configuration might be in:
// 1. this file :)
// 2. ./node_modules/grunt-*<task_name>/
// 3. ./tasks/<task_name>.js
// This loads all grunt tasks matching the grunt-*, @*/grunt-* patterns.
require('load-grunt-tasks')(grunt);
var configs = require('load-grunt-configs')(grunt, {
config: {
src: 'tasks/*.js',
},
});
grunt.initConfig(configs);
grunt.registerTask('build', [
'clean',
'webpack:build',
]);
grunt.registerTask('build-tests', [
'build',
'webpack:unit_tests',
'webpack:functional_tests',
]);
grunt.registerTask('test', [
'lint',
'flowbin:check',
'build-tests',
'mochaTest:unit',
'mochaTest:functional',
]);
grunt.registerTask('develop', [
'flowbin:start',
'watch:develop',
]);
grunt.registerTask('lint', 'checks for syntax errors', function() {
if (process.env.SKIP_LINT) {
grunt.log.writeln('lint task skipped because of $SKIP_LINT');
} else {
grunt.task.run([
'eslint',
]);
}
});
};