forked from webrtc/test-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
50 lines (46 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
'use strict';
/* globals module */
module.exports = function(grunt) {
// configure project
grunt.initConfig({
// make node configurations available
pkg: grunt.file.readJSON('package.json'),
csslint: {
options: {
csslintrc: '.csslintrc'
},
src: ['css/*.css', 'src/css/*.css']
},
eslint: {
options: {
configFile: '.eslintrc',
cache: true
},
target: ['src/**/*.js']
},
// Runs the npm test command which has access to the grunt path.
githooks: {
all: {
options: {
command: 'npm',
},
'pre-commit': 'test'
}
},
htmlhint: {
html1: {
src: ['src/**/*.html']
},
html2: {
src: ['index.html']
}
},
});
// enable plugins
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-githooks');
grunt.loadNpmTasks('grunt-htmlhint');
// set default tasks to run when grunt is called without parameters
grunt.registerTask('default', ['csslint', 'htmlhint', 'eslint']);
};