forked from linagora/linagora.esn.emoticon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
47 lines (41 loc) · 1.2 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
'use strict';
module.exports = function(grunt) {
var frontendFiles = ['frontend/js/**/*.js'];
var backendFiles = ['backend/**/*.js'];
var allFiles = frontendFiles.concat(backendFiles).concat(['test/**/*.js', 'index.js', 'Gruntfile.js']);
grunt.initConfig({
karma: {
unit: {
configFile: './test/config/karma.conf.js',
browsers: ['PhantomJS']
}
},
eslint: {
target: allFiles
},
puglint: {
all: {
options: {
config: {
disallowAttributeInterpolation: true,
disallowLegacyMixinCall: true,
validateExtensions: true,
validateIndentation: 2
}
},
src: [
'frontend/**/*.pug'
]
}
}
});
require('load-grunt-tasks')(grunt);
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-puglint');
grunt.loadNpmTasks('grunt-release');
grunt.registerTask('pug-linter', 'Check the pug/jade files', ['puglint:all']);
grunt.registerTask('linters', ['eslint', 'pug-linter']);
grunt.registerTask('test-frontend', ['karma:unit']);
grunt.registerTask('test', ['linters', 'test-frontend']);
grunt.registerTask('default', ['test']);
};