Bug 1029385 - Rewrite app-makefile rule in javascript

I didn't know this feature! cool.