Skip to content

Commit 2d7a497

Browse files
authored
Merge pull request #1398 from getredash/012patches
Fix: missing images after minification
2 parents 2de4aa2 + 788c16c commit 2d7a497

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

gulpfile.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ gulp.task('html', function () {
105105
});
106106

107107
gulp.task('images', function () {
108-
return gulp.src(yeoman.app + '/images/**/*')
108+
return gulp.src(applyAppPath(['/images/**/*']))
109109
.pipe($.cache($.imagemin({
110110
optimizationLevel: 5,
111111
progressive: true,
@@ -114,6 +114,16 @@ gulp.task('images', function () {
114114
.pipe(gulp.dest(yeoman.dist + '/images'));
115115
});
116116

117+
gulp.task('leaflet', function () {
118+
return gulp.src(applyAppPath(['/bower_components/leaflet/dist/images/**/*']))
119+
.pipe($.cache($.imagemin({
120+
optimizationLevel: 5,
121+
progressive: true,
122+
interlaced: true
123+
})))
124+
.pipe(gulp.dest(yeoman.dist + '/styles/images'));
125+
});
126+
117127
gulp.task('copy:extras', function () {
118128
return gulp.src(applyAppPath(['/*/.*', '/google_login.png', '/favicon.ico', '/robots.txt']), { dot: true })
119129
.pipe(gulp.dest(yeoman.dist));
@@ -125,7 +135,7 @@ gulp.task('copy:fonts', function () {
125135
});
126136

127137
gulp.task('build', ['clean:dist'], function () {
128-
runSequence(['images', 'copy:extras', 'copy:fonts', 'client:build']);
138+
runSequence(['images', 'leaflet', 'copy:extras', 'copy:fonts', 'client:build']);
129139
});
130140

131141
gulp.task('default', ['build']);

0 commit comments

Comments
 (0)