-
Notifications
You must be signed in to change notification settings - Fork 10
/
Gruntfile.js
85 lines (81 loc) · 1.98 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
78
79
80
81
82
83
84
85
module.exports = function(grunt) {
grunt.initConfig({
// Task configuration
concat: {
options: {
separator: ';',
},
js_frontend: {
src: [
'./bower_components/jquery/dist/jquery.js',
'./assets/javascript/fix.js',
'./bower_components/seiyria-bootstrap-slider/dist/bootstrap-slider.js',
'./bower_components/bootstrap/dist/js/bootstrap.js',
'./bower_components/angular/angular.js',
'./bower_components/angular-animate/angular-animate.js',
'./bower_components/angular-bootstrap/ui-bootstrap-tpls.js',
'./bower_components/angular-soundmanager2/dist/angular-soundmanager2.js',
'./bower_components/angular-bootstrap-slider/slider.js',
'./bower_components/angular-base64/angular-base64.js',
'./assets/javascript/custom.js'
],
dest: './public/assets/javascript/javascript.js'
}
},
less: {
development: {
options: {
compress: true, //minifying the result
},
files: {
"./public/assets/stylesheets/stylesheet.css":"./assets/stylesheets/custom.less"
}
}
},
uglify: {
options: {
mangle: false
},
frontend: {
files: {
'./public/assets/javascript/javascript.min.js': './public/assets/javascript/javascript.js'
}
}
},
watch: {
js_frontend: {
files: [
'./assets/javascript/custom.js'
],
tasks: ['concat:js_frontend', 'uglify'],
options: {
livereload: true
}
},
less: {
files: [
'./assets/stylesheets/*.less'
],
tasks: ['less'],
options: {
livereload: true
}
},
files: {
files: ['./public/*', './public/templates/*'],
options: {
livereload: true
}
},
grunt: {
files: ['Gruntfile.js']
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['watch']);
grunt.registerTask('init', ['concat', 'less', 'uglify']);
};