This repository was archived by the owner on Apr 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.js
More file actions
40 lines (38 loc) · 1.38 KB
/
Gruntfile.js
File metadata and controls
40 lines (38 loc) · 1.38 KB
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) {
// load all grunt tasks
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.initConfig({
watch: {
// if any .less file changes in directory "public/css/" run the "less"-task.
files: ["assets/static/less/**/*.less"],
tasks: ["less", "cssmin"]
},
// "less"-task configuration
less: {
// production config is also available
development: {
options: {
// Specifies directories to scan for @import directives when parsing.
// Default value is the directory of the source, which is probably what you want.
paths: ["assets/static/less/"],
},
files: {
// compilation.css : source.less
"assets/static/css/main.unminified.css": "assets/static/less/main.css.less"
}
},
},
cssmin: {
target: {
files: {
'assets/static/css/main.css': ['assets/static/css/main.unminified.css']
}
}
},
});
// the default task (running "grunt" in console) is "watch"
grunt.registerTask('default', ['watch']);
};