-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
62 lines (52 loc) · 1.48 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
55
56
57
58
59
60
61
62
module.exports = function (grunt) {
// Project Configuration
grunt.initConfig({
pkg : grunt.file.readJSON('package.json'),
// Compile LESS files to CSS by keeping them readable
less : {
options : {
paths : ['src/']
},
compile : {
files : {
'build/src/base.css' : 'src/base.less',
'build/src/forms.css' : 'src/forms.less',
'build/src/helper.css' : 'src/helper.less',
'build/src/buttons.css' : 'src/buttons.less',
}
}
},
// Create a beautified build by concating
concat : {
options : {
banner : '/*! <%= pkg.name %> | v<%= pkg.version %> | MIT License | ' +
'<%= pkg.author %> */\n',
},
css : {
src : [
'build/src/base.css',
'build/src/helper.css',
'build/src/forms.css',
'build/src/buttons.css'
],
dest : 'build/chanakya.css'
}
},
// Watch task for file changes in LESS which will compile them into CSS
observe : {
css : {
files : 'src/*.less',
tasks : ['less:compile'],
options : {
livereload : true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.renameTask('watch', 'observe');
grunt.registerTask('watch', ['less:compile', 'observe']);
grunt.registerTask('default', ['less:compile', 'concat']);
};