Sha256: d2e9b0b2c5176dca8158da2616a85b8d8d80e874c06e1f451c7554b7ddf9c4cd
Contents?: true
Size: 1.13 KB
Versions: 2
Compression:
Stored size: 1.13 KB
Contents
class Rafters::Engine < Rails::Engine isolate_namespace Rafters config.generators do |g| g.test_framework :rspec g.assets false g.helper false end initializer "rafters.load_view_paths" do |app| Rafters.view_paths = Dir[app.root.join("app", "components", "*", "views")] end initializer "rafters.load_asset_paths" do |app| Rafters.asset_paths = Dir[app.root.join("app", "components", "*", "assets", "*")] end initializer "rafters.set_asset_paths", :after => "rafters.load_asset_paths" do |app| app.config.assets.paths += Rafters.asset_paths end initializer "rafters.set_autoload_paths", :before => :set_autoload_paths do |app| app.config.autoload_paths += Dir[app.root.join("app", "components", "*/")] end config.after_initialize do |app| app.assets.unregister_preprocessor('text/css', Sprockets::DirectiveProcessor) app.assets.register_preprocessor('text/css', Rafters::DirectiveProcessor) app.assets.unregister_preprocessor('application/javascript', Sprockets::DirectiveProcessor) app.assets.register_preprocessor('application/javascript', Rafters::DirectiveProcessor) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rafters-0.0.2 | lib/rafters/engine.rb |
rafters-0.0.1 | lib/rafters/engine.rb |