ES6 and Browserify

I’ve decided to move away from ES5 JavaScript and into ES6 / ES2015 as it’s something I’ve been wanting to work with for quite some time.

I’m presently doing this in the context of my REST Cache, however I’m very much considering moving my personal project, Payload, over to ES6 whilst that project is still fairly simple.

New ES6 module for the REST cache’s Rules table

I’m using Browserify to manage dependencies and combination, and using Babel to transpile ES6 into ES5 for use in the browser. Gulp is used to watch and build the sources and source maps.

I’ve not really used this particular build pipeline before so there was a little bit of a learning curve here, however I’m pleased with the results and will be continuing with the actual functionality of the REST cache plugin tomorrow!

I’ve found time to add a PRNG to Payload, and identified some game seeds that consistently cause Kripken’s Box2D port to hang. I did run some initial profiling on the problem games, however I’m not seeing anything obvious in there. I have a hunch that this may be caused by degenerate triangles in the 2D planet meshes, however I’ll need to investigate this further. Again, the project is still in it’s very early days so if I need to switch to a different port, if only for ease of debugging, then I may well do so.

Leave a Reply