As my client side CoffeeScript hacks grow larger1, I'm finding the constraint of keeping all the code in html script tags wrapper on page to be awkward. One little project that I'm hoping to have time for this weekend requires combining several html5 canvas effects, they may share some common elements, and each is growing unwieldy for their separate html header tags.
Here's what I'd like to see in my html file:
So far I haven't got the above setup to work and have had to fall back on keeping all my CoffeeScript in the html file (yuck).
After more searching I found trusty Trevor Burnham debugging and patching browser CoffeeScript in the following issue:
Under the patch, you can now write
and be certain that
one.coffeewill run first, then the inline code, then
coffee-script.jswill of course run before any CoffeeScript. This should probably be mentioned in the docs.