-
Notifications
You must be signed in to change notification settings - Fork 5
/
Gruntfile.js
executable file
·58 lines (46 loc) · 1.21 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
module.exports = function (grunt) {
'use strict';
// Force use of Unix newlines
grunt.util.linefeed = '\n';
RegExp.quote = function (string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&');
};
var fs = require('fs');
var path = require('path');
// Project configuration.
grunt.initConfig({
less: {
compileCore: {
options: {
strictMath: true,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: 'app.css.map',
sourceMapFilename: 'tweetset/collect/static/css/app.css.map'
},
files: {
'tweetset/collect/static/css/app.css': 'less/bootstrap.less'
}
},
minify: {
options: {
cleancss: true,
report: 'min'
},
files: {
'tweetset/collect/static/css/app.min.css': 'tweetset/collect/static/css/app.css',
}
}
},
watch: {
less: {
files: 'less/*.less',
tasks: ['less'],
}
},
});
// These plugins provide necessary tasks.
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
grunt.registerTask('build', ['less']);
grunt.registerTask('default', ['less']);
};