Module | Jammit::Helper |
In: |
lib/jammit/helper.rb
|
The Jammit::Helper module, which is made available to every view, provides helpers for writing out HTML tags for asset packages. In development you get the ordered list of source files — in any other environment, a link to the cached packages.
DATA_URI_START | = | "<!--[if (!IE)|(gte IE 8)]><!-->" unless defined?(DATA_URI_START) |
DATA_URI_END | = | "<!--<![endif]-->" unless defined?(DATA_URI_END) |
MHTML_START | = | "<!--[if lte IE 7]>" unless defined?(MHTML_START) |
MHTML_END | = | "<![endif]-->" unless defined?(MHTML_END) |
Writes out the URL to the bundled and compressed javascript package, except in development, where it references the individual scripts.
If embed_assets is turned on, writes out links to the Data-URI and MHTML versions of the stylesheet package, otherwise the package is regular compressed CSS, and in development the stylesheet URLs are passed verbatim.
Writes out the URL to the concatenated and compiled JST file — we always have to pre-process it, even in development.
HTML tags for the ‘datauri’, and ‘mhtml’ versions of the packaged stylesheets, using conditional comments to load the correct variant.