module Viter
Singleton registry for accessing the packs path using a generated manifest. This allows javascript_pack_tag, stylesheet_pack_tag, asset_pack_path to take a reference to, say, “calendar.js” or “calendar.css” and turn it into “/packs/calendar-1016838bab065ae1e314.js” or “/packs/calendar-1016838bab065ae1e314.css”.
When the configuration is set to on-demand compilation, with the `compile: true` option in the viter.yml file, any lookups will be preceded by a compilation if one is needed.
Constants
- VERSION
Public Instance Methods
ensure_log_goes_to_stdout() { || ... }
click to toggle source
# File lib/viter.rb, line 25 def ensure_log_goes_to_stdout old_logger = Viter.logger Viter.logger = ActiveSupport::Logger.new(STDOUT) yield ensure Viter.logger = old_logger end
instance()
click to toggle source
# File lib/viter.rb, line 13 def instance @instance ||= Viter::Instance.new end
instance=(instance)
click to toggle source
# File lib/viter.rb, line 9 def instance=(instance) @instance = instance end
with_node_env(env) { || ... }
click to toggle source
# File lib/viter.rb, line 17 def with_node_env(env) original = ENV['NODE_ENV'] ENV['NODE_ENV'] = env yield ensure ENV['NODE_ENV'] = original end