Module | Jammit |
In: |
lib/jammit/command_line.rb
lib/jammit/compressor.rb lib/jammit/controller.rb lib/jammit/helper.rb lib/jammit/packager.rb lib/jammit/railtie.rb lib/jammit/routes.rb lib/jammit.rb |
VERSION | = | "0.6.5" | ||
ROOT | = | File.expand_path(File.dirname(__FILE__) + '/..') | ||
ASSET_ROOT | = | File.expand_path((defined?(Rails) && Rails.root.to_s.length > 0) ? Rails.root : ENV['RAILS_ROOT'] || ".") unless defined?(ASSET_ROOT) | ||
DEFAULT_PUBLIC_ROOT | = | (defined?(Rails) && Rails.public_path.to_s.length > 0) ? Rails.public_path : File.join(ASSET_ROOT, 'public') unless defined?(PUBLIC_ROOT) | ||
DEFAULT_CONFIG_PATH | = | File.join(ASSET_ROOT, 'config', 'assets.yml') | ||
DEFAULT_PACKAGE_PATH | = | "assets" | ||
DEFAULT_JST_SCRIPT | = | File.join(ROOT, 'lib/jammit/jst.js') | ||
DEFAULT_JST_COMPILER | = | "template" | ||
DEFAULT_JST_NAMESPACE | = | "window.JST" | ||
COMPRESSORS | = | [:yui, :closure, :uglifier] | ||
DEFAULT_COMPRESSOR | = | :yui | ||
JS_EXTENSION | = | /\.js\Z/ | Extension matchers for JavaScript and JST, which need to be disambiguated. | |
DEFAULT_JST_EXTENSION | = | "jst" |
allow_debugging | [R] | |
compress_assets | [R] | |
compressor_options | [R] | |
compressors | [RW] | |
config_path | [R] | |
configuration | [R] | |
css_compressor_options | [R] | |
embed_assets | [R] | |
gzip_assets | [R] | |
include_jst_script | [R] | |
javascript_compressor | [R] | |
mhtml_enabled | [R] | |
package_assets | [R] | |
package_path | [R] | |
public_root | [R] | |
template_extension | [R] | |
template_extension_matcher | [R] | |
template_function | [R] | |
template_namespace | [R] |
Generate the base filename for a version of a given package.
Load the complete asset configuration from the specified @config_path@. If we‘re loading softly, don‘t let missing configuration error out.
Keep a global (thread-local) reference to a @Jammit::Packager@, to avoid recomputing asset lists unnecessarily.
Force a reload by resetting the Packager and reloading the configuration. In development, this will be called as a before_filter before every request.
Allows command-line definition of `PUBLIC_ROOT`, for those using Jammit outside of Rails.
Clone of active_support‘s symbolize_keys, so that we don‘t have to depend on active_support in any fashion. Converts a hash‘s keys to all symbols.