Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could compile coffeescript in development and commit the resulting JS file. Automatically recompiled Coffeescript is fantastic in development, but IMO, there's really no compelling reason to be compiling it production-side.


(I can't seem to reply to your comment, so replying here)

You could look at using something like a Git pre-commit hook to do that pretty trivially. I personally use a rake task that compiles all my Sass and Coffeescript to their respective CSS and JS files, then packs it into minified-and-gzipped files with jammit, then commit the resulting bundle. I end up serving pre-baked-and-concatenated assets and it works just fine.


This is the best way to do it, and using a continuous integration server to emit a binary as the output of your build, as our ancestors in compiled languages did in days of yore, is a good way to make it happen. You don't even need to commit it; just use the tarball (or whatever) as the artifact of deployment.


Yup - I'm going to need a 'build for production' system - I've used Hudson for this in the past - that does this and sets up the production push.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: