-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
99 lines (95 loc) · 3.91 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
module.exports = function (grunt) {
grunt.initConfig({
uglify: {
site_custom_js: {
options: {
beautify: false,
preserveComments: false
},
files: {
'./app/assets/javascripts/build.min.js': [
'./resources/javascripts/jqBootstrapValidation-1.3.7-customized.js',
'./resources/javascripts/custom.js'
]
}
}
},
concat: {
options: {
separator: ';'
},
dist: {
src: [
'./resources/javascripts/chain/jquery-1.11.1.min.js',
'./resources/javascripts/chain/jquery-migrate-1.2.1.min.js',
'./resources/javascripts/chain/jquery-ui-1.10.3.min.js',
'./resources/javascripts/chain/bootstrap.min.js',
'./resources/javascripts/chain/modernizr.min.js',
'./resources/javascripts/chain/pace.min.js',
'./resources/javascripts/chain/retina.min.js',
'./resources/javascripts/chain/select2.full.min.js',
'./resources/javascripts/chain/jquery.cookies.js',
'./resources/javascripts/chain/bootstrap-timepicker.min.js',
'./resources/javascripts/chain/wysihtml5-0.3.0.min.js',
'./resources/javascripts/chain/bootstrap-wysihtml5.js',
'./app/assets/javascripts/build.min.js'
],
dest: './app/assets/javascripts/build.min.js'
},
respond_html5shiv: {
src: [
'./resources/javascripts/chain/respond.min.js',
'./resources/javascripts/chain/html5shiv.js'
],
dest: './app/assets/javascripts/build_lt_ie_9_js.min.js'
}
},
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},
target: {
files: {
'./app/assets/stylesheets/build.min.css': [
'./resources/stylesheets/chain/style.default.css',
'./resources/stylesheets/bootstrap-override.css',
'./resources/stylesheets/chain/bootstrap-wysihtml5.css',
'./resources/stylesheets/chain/bootstrap-timepicker.min.css',
'./resources/stylesheets/chain/select2.min.css',
'./resources/stylesheets/chain/select2-bootstrap.css',
'./resources/stylesheets/custom.css'
]
}
}
},
copy: {
main: {
files: [
{
expand: true,
flatten: true,
src: ['./resources/bower_components/components-font-awesome/fonts/*',
'./resources/bower_components/bootstrap/fonts/*'],
dest: './app/assets/fonts/',
filter: 'isFile'
}
]
},
ckeditor: {
expand: true,
cwd: './resources/javascripts/ckeditor/',
src: ['**'],
dest: './app/assets/javascripts/ckeditor/'
},
// {expand: true, cwd: 'path/', src: ['**'], dest: 'dest/'},
},
clean: ['./resources/tmp']
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['uglify', 'concat', 'cssmin', 'copy', 'clean']);
};