-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
99 lines (88 loc) · 2.48 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) {
// Project configuration.
grunt.initConfig({
sass: {
dist: {
options: {
style: 'expanded'
},
files: {
'css/styles.css': 'sass/styles.scss'
}
}
},
includes: {
build: {
cwd: 'html',
src: ['*.html'],
dest: 'build/',
options: {
flatten: true,
includePath: 'html',
}
}
},
cssmin : {
options: {
style: 'compressed',
},
target : {
src : ["css/styles.css"],
dest: 'combined/combined.min.css'
}
},
uglify: {
options: {
beautify:false,
mangle: false
},
build: {
files: {
'combined/combined-vendor.min.js':[
'vendors/nice-select/js/jquery.nice-select.min.js',
'vendors/isotope/imagesloaded.pkgd.min.js',
'vendors/isotope/isotope-min.js',
'vendors/owl-carousel/owl.carousel.min.js',
'js/jquery.ajaxchimp.min.js',
'js/mail-script.js'
],
'combined/combined-lib.min.js': [
'js/jquery-3.3.1.js',
'js/popper.js',
'js/bootstrap.js',
'js/bootstrap.bundle.js',
'js/stellar.js',
'js/jquery.magnific-popup.min.js',
],
'combined/combined-custom.min.js' : [
'js/myjs.js'
],
}
}
},
watch: {
html: {
files: ['html/*.html'],
tasks: ['includes'],
options: { livereload: true },
event: ['added', 'deleted']
},
css: {
files: 'sass/**/*.scss',
tasks: ['sass','cssmin']
},
js: {
files: ['js/*.js', 'js/vendor/*.js', '../common/js/*.js'],
tasks: ['uglify']
},
},
});
// Load required modules
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-includes');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
// Task definitions
grunt.registerTask('default', ['includes', 'cssmin', 'uglify', 'watch']);
};