| Tags: front-end game development

A quick post to announce that I've just updated generator-gamejam, a Yeoman generator to quickly scaffold a HTML 5 game project, ideal for game jams.

The motivation for this update was to fix a nasty bug that would cause some files to be 0-bytes when copied over to a dist folder. Inside the gulp task that copied the files, I was copying the files in two statements –one to copy static files, another one to copy built files. But I wasn't returning both streams. And thus the bug.

There is a module, merge-stream that would combine multiple streams into one. So the code now it's something similar to this:

var merge = require('merge-stream');

gulp.task('dist', ['build'], function () {
var raw = gulp.src(...).pipe(gulp.dest('./dist');
var built = gulp.src(...).pipe(gulp.dest('./dist');

return merge(raw, built);

Besides fixing this bug, I took the opportunity to change live-reload for browser-sync, since it doesn't require a browser extension. And now you can deploy to Github Pages as well!

You can try the generator by installing it and Yeoman via npm and then running yo:

npm -g yo generator-gamejam
yo gamejam