forked from miketricking/bootstrap-image-hover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
93 lines (67 loc) · 1.79 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
module.exports = function(grunt) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: [
'src/js/*.js', // All JS files
],
dest: 'src/js/production.js',
}
},
clean: {
build: {
src: ['src/js/production.js']
}
},
uglify: {
build: {
files: {
'dist/js/production.min.js': ['src/js/production.js']
}
}
},
copy: {
main: {
files: [
{expand: true, flatten: true, src: ['src/index.html'], dest: 'dist/'}
]
}
},
imagemin: {
dynamic: {
files: [{
expand: true,
cwd: 'src/images/',
src: ['**/*.{png,jpg,gif}'],
dest: 'dist/images'
}]
}
},
autoprefixer: {
dist: {
files: {
'src/css/effectspre.css': 'src/css/effects.css'
}
}
},
// configure cssmin to minify css files ------------------------------------
cssmin: {
build: {
files: {
'dist/css/effects.min.css': 'src/css/effectspre.css'
}
}
},
});
// 3. Where we tell Grunt we plan to use this plug-in.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['clean', 'concat', 'uglify', 'imagemin', 'autoprefixer','cssmin', 'copy']);
};