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.

Methods

Constants

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)

Public Instance methods

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.

Private Instance methods

HTML tags for the ‘datauri’, and ‘mhtml’ versions of the packaged stylesheets, using conditional comments to load the correct variant.

HTML tags, in order, for all of the individual stylesheets.

HTML tags for the stylesheet packages.

Generate the stylesheet tags for a batch of packages, with options, by yielding each package to a block.

[Validate]