documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

Does this work with <script>...</script>? #107

Closed balupton closed 13 years ago

balupton commented 13 years ago

I'm coming from Zend Framework and using the bundlers found here: https://github.com/balupton/balphp/tree/master/lib/Bal/View/Helper

It supports adding script elements to your bundled js file too (so would add script('hello')\n to your bundle file - in order of course).

jashkenas commented 13 years ago

I'm not sure exactly what feature you're proposing to add here ... can you be a bit more specific?

balupton commented 13 years ago

Ohhh.. the script elements got removed from my post...

Is there a way for jammit to package inline scripts as well, eg.

I'm guessing the answer here would be to not use inline scripts if you want them packed?

jashkenas commented 13 years ago

Yeah ... the notion of an "inline script" doesn't really apply to Rails, I think ... because you're not writing in an inherently markup language. Stuffing JavaScript into strings isn't a great idea -- and is the whole point of Jammit having support for JavaScript templates.

balupton commented 13 years ago

Cool no worries then :-) Thanks for the help.