Bug 1029967 - rewrite Makefile in email app in javascript

files in app/js directory.