crunching multiple js files during development
- by Yaron Naveh
I'm writing a backbone.js app. I have multiple js, css and html template files. I also have a script to crunch them into a single file so it is faster to download. How should I work during development:
Add a listener to the file system and after every change compile the files so I can see it in a browser. This implies a 1-2 seconds overhead before I can see what I did, which is annoying for html fine-tuning.
Somehow browse using the multiple files during development and only crunch before going to production. This means I need to have a separate index.html for dev and prod.
What's your take?