-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
53 lines (50 loc) · 1.4 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
/*!
* Grunt file
*/
/*jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-less' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
jshint: {
options: {
jshintrc: true
},
all: ['assets/js/**/*.js']
},
csslint: {
options: {
csslintrc: 'assets/.csslintrc'
},
all: 'assets/css/presentation.css'
},
less: {
options: {
compress: true
},
dist: {
files: {
'assets/css/presentation.css': 'assets/css/presentation.less'
}
}
},
jscs: {
all: ['assets/js/*.js', 'assets/js/**/*.js']
},
watch: {
files: [
'<%= jshint.all %>',
'assets/css/**/*.less',
'.{csslintrc,jscsrc,jshintrc,jshintignore}'
],
tasks: ['test']
}
} );
grunt.registerTask( 'build', [ 'less' ] );
grunt.registerTask( 'test', [ 'build', 'jshint', 'csslint' ] );
grunt.registerTask( 'default', 'test' );
};