-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathGruntfile.js
48 lines (42 loc) · 1.34 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
'use strict';
module.exports = function(grunt) {
var css_path = 'controlcenter/static/controlcenter/css/',
styl_path = 'controlcenter/stylus/',
file_names = ['all', 'chartist-default-colors', 'chartist-material-colors'],
files = {};
for (var i = 0; i < file_names.length; i++){
files[css_path + file_names[i] + '.css'] = styl_path + file_names[i] + '.styl';
}
grunt.initConfig({
stylus: {
build: {
options: {
compress: false,
urlfunc: 'embedurl',
use: [
function(){
return require('autoprefixer-stylus')('last 2 versions');
}
]
},
files: files
}
},
combine_mq: {
build: {
src: css_path + 'all.css',
dest: css_path + 'all.css'
}
},
watch: {
css: {
files: styl_path + '*.styl',
tasks: ['stylus:build', 'combine_mq:build']
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-combine-mq');
grunt.registerTask('default', ['stylus', 'combine_mq']);
};