-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
77 lines (71 loc) · 3.14 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
70
71
72
73
74
75
76
77
module.exports = function (grunt) {
//Initializing the configuration object
grunt.initConfig({
// Task configuration
less: {
development: {
options: {
compress: true, //minifying the result
},
files: {
//compiling frontend.less into frontend.css
"web/assets/css/bootstrap-frontend.min.css": "vendor_js/bootstrap/custom/frontend/bootstrap/custom-bootstrap.less",
"web/assets/css/bootstrap-theme-frontend.min.css": "vendor_js/bootstrap/custom/frontend/theme/custom-theme.less",
//compiling backend.less into backend.css
"web/assets/css/bootstrap-backend.min.css": "vendor_js/bootstrap/custom/backend/bootstrap/custom-bootstrap.less",
"web/assets/css/bootstrap-theme-backend.min.css": "vendor_js/bootstrap/custom/backend/theme/custom-theme.less"
}
}
},
bowercopy: {
options: {
srcPrefix: 'vendor_js',
destPrefix: 'web/assets'
},
scripts: {
files: {
'js/jquery.js': 'jquery/dist/jquery.js',
'js/jquery.min.js': 'jquery/dist/jquery.min.js',
'js/jquery-ui.js': 'jquery-ui/jquery-ui.js',
'js/jquery-ui.min.js': 'jquery-ui/jquery-ui.min.js',
'js/bootstrap.js': 'bootstrap/dist/js/bootstrap.js',
'js/bootstrap.min.js': 'bootstrap/dist/js/bootstrap.min.js',
'js/angular.js': 'angular/angular.js',
'js/angular.min.js': 'angular/angular.min.js'
}
},
stylesheets: {
files: {
'css/bootstrap.css': 'bootstrap/dist/css/bootstrap.css',
'css/bootstrap.min.css': 'bootstrap/dist/css/bootstrap.min.css',
'css/bootstrap-theme.css': 'bootstrap/dist/css/bootstrap-theme.css',
'css/bootstrap-theme.min.css': 'bootstrap/dist/css/bootstrap-theme.min.css'
}
},
fonts: {
files: {
'fonts': 'bootstrap/dist/fonts'
}
}
},
watch: {
less: {
files: ['vendor_js/bootstrap/custom/backend/bootstrap/*.less',
'vendor_js/bootstrap/custom/backend/theme/*.less',
'vendor_js/bootstrap/custom/frontend/bootstrap/*.less',
'vendor_js/bootstrap/custom/frontend/theme/*.less',
], //watched files
tasks: ['bowercopy', 'less'], //tasks to run
options: {
livereload: true //reloads the browser
}
}
}
});
// Plugin loading
grunt.loadNpmTasks('grunt-bowercopy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
// Task definition
grunt.registerTask('default', ['bowercopy', 'watch']);
};