-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
40 lines (33 loc) · 932 Bytes
/
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
'use strict';
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
grunt.initConfig({
// setting folder templates
dirs: {
css: 'assets/css',
js: 'assets/js',
less: 'assets/less'
},
// Compile all .less files.
less: {
admin: {
files: {
'<%= dirs.css %>/style.css': '<%= dirs.less %>/style.less',
}
}
},
watch: {
less: {
files: ['<%= dirs.less %>/*.less'],
tasks: ['less:admin'],
options: {
livereload: true
}
}
},
});
// Load NPM tasks to be used here
grunt.loadNpmTasks( 'grunt-contrib-less' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.registerTask('default', ['less']);
};