I wrapped up a long running refactor of my online board game Damocles today with a deployment to Heroku. I want to focus this post on a pain point I ran into while doing this related to casing.

The purpose behind the refactor was to break up a monolithic file containing almost every React based piece of the project into separate files for all the React components. Part of this involved renaming some of the existing files, as I wanted to go from lowercase to PascalCase (ie, damoclesgame to DamoclesGame). The details of what went wrong aren’t really as interesting as the lessons learned, so I’m moving straight ahead to that.

  • Changing case of existing files in git will not register as a change without the command: git mv casedfile.js CasedFile.js
  • Node on Heroku needs exact file casing or else everything breaks.

Good lessons to learn, and as of now Damocles is back up and playable (as much as it ever was). I’m going to go ahead and add it to my front page here for anyone interested (though you’re going to need a friend).