replace javascript generation with coffee-script generation