class HamlCoffeeAssets::Configuration
Haml Coffee configuration object that contains the default values. It’s a plain Ruby object so a Sinatra app doesn’t have to depend on ActiveSupport just because of the Rails
engine configuration.
Attributes
Ignore path when generate the JST
Clean inline CoffeeScript values
Custom global context to merge
Custom global code clean value function
Custom find and preserve function
Custom global HTML escaping function
Custom global precede function
Custom preserve function
Custom object reference function
Custom global succeed function
Custom global surround function
Define the global amd module dependencies
Escape template code output for attributes
Escape template code output
Template format, either html5, html4 or xhtml
Path to custom helpers shared by Rails
and JS.
A proc that is called to modify the template name used as the JST key. The proc is passed the name as an argument and should return the modified name (or unmodified) name.
Template namespace
Define the function placement, either ‘global` or `amd`
List of tags to preserve
List of self closing tags
Path to templates shared by Rails
and JS.
Uglify HTML output by skip indention
Public Class Methods
Constructor with defaults
# File lib/haml_coffee_assets/configuration.rb, line 19 def initialize self.namespace = 'window.JST' self.format = 'html5' self.uglify = false self.basename = false self.escapeHtml = true self.escapeAttributes = true self.cleanValue = true self.placement = 'global' self.dependencies = { hc: 'hamlcoffee_amd' } self.customHtmlEscape = 'window.HAML.escape' self.customCleanValue = 'window.HAML.cleanValue' self.customPreserve = 'window.HAML.preserve' self.customFindAndPreserve = 'window.HAML.findAndPreserve' self.customSurround = 'window.HAML.surround' self.customSucceed = 'window.HAML.succeed' self.customPrecede = 'window.HAML.precede' self.customReference = 'window.HAML.reference' self.preserveTags = 'textarea,pre' self.selfCloseTags = 'meta,img,link,br,hr,input,area,param,col,base' self.context = 'window.HAML.context' self.templates_path = 'app/assets/javascripts/templates' self.global_context_asset = 'templates/context.js' self.name_filter = lambda { |n| parts = n.sub(/^templates\//, '').split('/') parts.last.sub!(/^_/, '') parts.join('/') } end