Updated callbacks for gulp.

This commit is contained in:
chris062689@gmail.com 2018-12-18 20:37:54 -05:00
parent 37f7003c06
commit 5a4965fb38

View File

@ -52,6 +52,7 @@ gulp.task('assets:images', function() {
var screenshotImages = gulp.src(`build/images/screenshots/*`) var screenshotImages = gulp.src(`build/images/screenshots/*`)
.pipe(imageResize({ width: 400, height: 240, crop: false })) .pipe(imageResize({ width: 400, height: 240, crop: false }))
.pipe(gulp.dest(`build/images/screenshots/thumbs`)); .pipe(gulp.dest(`build/images/screenshots/thumbs`));
return merge(baseImages, jumbotronImages, bannerImages, boxartImages, iconImages, screenshotImages); return merge(baseImages, jumbotronImages, bannerImages, boxartImages, iconImages, screenshotImages);
}); });
@ -83,7 +84,7 @@ gulp.task('hugo', function (cb) {
}); });
}); });
gulp.task('final:serve', function() { gulp.task('final:serve', function(done) {
browserSync.init({ browserSync.init({
open: false, open: false,
server: { server: {
@ -99,11 +100,14 @@ gulp.task('final:serve', function() {
gulp.watch('build/**/*').on('change', function() { gulp.watch('build/**/*').on('change', function() {
browserSync.reload(x); browserSync.reload(x);
}); });
done()
}); });
gulp.task('final:publish', function(){ gulp.task('final:publish', function(done) {
fs.writeFileSync(`build/CNAME`, `${cname}`); fs.writeFileSync(`build/CNAME`, `${cname}`);
fs.writeFileSync(`build/robots.txt`, `Sitemap: https://${cname}/sitemap.xml\n\nUser-agent: *`); fs.writeFileSync(`build/robots.txt`, `Sitemap: https://${cname}/sitemap.xml\n\nUser-agent: *`);
done()
}); });
const cname = 'citra-emu.org'; const cname = 'citra-emu.org';