-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
66 lines (63 loc) · 1.92 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
'use strict';
module.exports = function (grunt) {
// load all grunt tasks
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
watch: {
// if any .less file changes in directory "html/css/" run the "less"-task.
files: ["less/app.less","less/bootstrap/*.less"],
tasks: ["less:dev"]
},
// "less"-task configuration
less: {
dev: {
options: {
paths: ["less/"]
},
files: {
"html/css/vendor/app.css": "less/app.less"
}
},
dist:{
options: {
paths: ["less/"],
cleancss: true
},
files: {
"html/css/vendor/app.css": "less/app.less"
}
}
},
copy: {
less: {
cwd: 'vendor/components/bootstrap/less',
src: '**/*',
dest: 'html/bootstrap',
expand: true
},
js: {
cwd: 'vendor/components/bootstrap/js',
src: 'bootstrap.min.js',
dest: 'html/js',
expand: true
},
fonts: {
cwd: 'vendor/components/bootstrap/fonts',
src: '**/*',
dest: 'html/fonts',
expand: true
},
jquery: {
cwd: 'vendor/components/jquery',
src: 'jquery.min.js',
dest: 'html/js',
expand: true
}
}
});
grunt.registerTask('default', ['watch']);
grunt.registerTask('dist', ['less:dist']);
grunt.registerTask('bootstrap',['copy:less','copy:js','copy:fonts','copy:jquery'])
};