Rebuilding Code for Engine 1401A1 (GHD037)

Wednesday was an even longer day than Tuesday. I just finished a 20-hour programming push to rebuild my Javascript development process and tools. The next stage of my project work, as I have mentioned before, is closely related to my own game project goal. One of my general development goals are to have an expressive, self-documenting code base that’s super-easy to understand, supported by tools that adhere to the same philosophy. One of the key tools is a so-called “task runner”, which gathers up the hundreds of separate files that comprise a modern web application and arranges them into a runnable project. I’d been using one called Mimosa, which was one of the better-documented task runners back in 2014, but I had found that some recent features I wanted (an up-to-date Typescript transpiler, for example) were unavailable unless I wanted to write an extension. After looking at that, I got a huge headache and was encourage to roll-up my own task runner using Gulp. To do this, I had to reconstruct a new build system around the technologies I wanted to keep using, which meant a lot of LEARNING ON THE FLY.

Major Achievements!

New System After banging my head against all these new concepts, I finally have a working port of the DurandalJS Starter Kit working with Gulp, with a very clean directory structure that makes sense to me. The whole thing is now a new project called Engine 1401A1, which will be a continuation of the development of the previous engine Project 1401.

I’m still using the DurandalJS web app framework, which in turn is build on RequireJS and KnockoutJS. These are pretty cool systems for developing modular Javascript with the KnockoutJS dynamic HTML rendering capabilities. The challenge was to figure out how to get it all talking to each other in a new build process, grabbing the necessary packages from remote repositories (npm and bower) and then copy the minimum needed to the actual staging directory before kicking the brand-new server code into action. I have it all distilled down to a few steps now:

  1. Install Git and Node if you haven’t already, and then npm install -g gulp-cli.
  2. Clone the repository! Open a terminal window and git clone
  3. Configure the tools! In the terminal window, cd Engine-1401A1/build and npm install once to download all the project library dependencies.
  4. Build the project! Execute the gulp command, which will load the gulpfile.js and build the web application.
  5. Run the project! Browse to the URL displayed in the terminal window!

I like really easy installation processes, and this one makes it very easy to start a new web app project. The next step is to port the existing Project 1401 files into Engine 1401A1. They should copy over without any problems because I’m still using the RequireJS syntax. After that, it’s major refactoring time to make the new system as expressive as possible.

Stuff Learned and GHDR Points Earned

This is a pretty major result. I committed working code to Github, and that’s worth at least 50 points in my soon-to-be-updated point list system. On top of that, I had to push through a lot of BS advice on the Internet to get some of this stuff to work.

50 posted working code to GitHub
30 fulfills a current wish, makes future results more possible, packaged results and made it available!
5 Eliminated some options
3 Tried a bunch of stuff I didn’t know would work.
2 Posted words on this website!
1 Researched a lot of code-related stuff

A record of 91 points! I also wore out another keyboard and have to replace it because the cursor keys are going crazy. Sigh.

About this Article Series

For my 2016 Groundhog Day Resolutions, I'm challenging myself to make something goal-related every day from February 2nd through December 12. All the related posts (and more!) are gathered on the Challenge Page.


A message from Dave:

I believe we all benefit when we respectfully share our perspectives on common experiences. My house rules are "please be respectful of divergent views" and "enjoy the flow of ideas!"

Leave a reply

Your email address will not be published. Required fields are marked *