Skip to content

Commit

Permalink
COL-1027 Include unversioned images for email templates in gulpfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pauline2k committed Jun 16, 2017
1 parent f10af00 commit f4139b6
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ gulp.task('copyBookmarkletFiles', function() {
);
});

/**
* Copy image files used by the weekly email. In order to be accessible from email clients, these
* should not be versioned.
*/
gulp.task('copyEmailFiles', function() {
return es.merge(
gulp.src('public/assets/img/*-logo.png', {'base': 'public'})
.pipe(gulp.dest('target')),

gulp.src('public/assets/img/icon_*.png', {'base': 'public'})
.pipe(gulp.dest('target'))
);
});

/**
* Copy Canvas customization code. Do not version or minify, since this code serves as a public reference.
*/
Expand Down Expand Up @@ -244,7 +258,16 @@ gulp.task('replaceImages', [ 'optimizeImages' ], function() {
* Create a build
*/
gulp.task('build', function() {
return runSequence('clean', 'buildEventDrops', ['replaceBookmarkletDependencies', 'copyFonts', 'minify'], 'copyCanvasCustomization', 'replaceImages', 'minifyViewer', 'copyViewerAssets');
return runSequence(
'clean',
'buildEventDrops',
['replaceBookmarkletDependencies', 'copyFonts', 'minify'],
'copyCanvasCustomization',
'copyEmailFiles',
'replaceImages',
'minifyViewer',
'copyViewerAssets'
);
});

/**
Expand Down

0 comments on commit f4139b6

Please sign in to comment.