-
Notifications
You must be signed in to change notification settings - Fork 18
/
Gruntfile.js
69 lines (64 loc) · 1.87 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
63
64
65
66
67
68
69
module.exports = function(grunt) {
grunt.initConfig({
sass: {
options: {
sourceMap: false,
sourceComments: false
},
development: {
options: {
outputStyle: 'nested',
},
files: {
'dist/select2-flat-theme.css': 'src/sass/layout.scss'
}
},
production: {
options: {
outputStyle: 'compressed',
},
files: {
'dist/select2-flat-theme.min.css': 'src/sass/layout.scss'
}
}
},
less: {
development: {
options: {
paths: ["src/less"]
},
files: {
"dist/select2-flat-theme.css": "src/less/layout.less"
}
},
production: {
options: {
paths: ["src/less"],
compress : true
},
files: {
"dist/select2-flat-theme.min.css": "src/less/layout.less"
}
}
},
watch: {
sass: {
files: 'src/sass/**/*.scss',
tasks: ['sass']
},
less: {
files: 'src/less/**/*.less',
tasks: ['less']
}
}
});
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
//Sass Task
grunt.registerTask('sass-Dev', ['sass:development']);
grunt.registerTask('sass-Build', ['sass:production']);
//Less Task
grunt.registerTask('less-Dev', ['less:development']);
grunt.registerTask('less-Build', ['less:production']);
};