Sha256: bc30891998a990b43826a29938f2fdefadd8f5a1bf6cb4d23e4d9f86a1f52e14

Contents?: true

Size: 620 Bytes

Versions: 9

Compression:

Stored size: 620 Bytes

Contents

require 'rails'
require 'rails/railtie'
require 'sewing_kit/webpack/compiler'
require 'sewing_kit/webpack/helper'
require 'sewing_kit/webpack/dev'

module SewingKit
  class Railtie < ::Rails::Railtie
    initializer "sewing_kit.initialize_webpack" do
      if Rails.env.development? && Rails.const_defined?(:Server)
        webpack_dev = SewingKit::Webpack::Dev.new
        webpack_dev.start
      end
    end

    config.after_initialize do
      ActiveSupport.on_load(:action_view) do
        include SewingKit::Webpack::Helper
      end
    end

    rake_tasks do
      load "tasks/sewing_kit.rake"
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sewing_kit-0.5.8 lib/sewing_kit/railtie.rb
sewing_kit-0.5.7 lib/sewing_kit/railtie.rb
sewing_kit-0.5.6 lib/sewing_kit/railtie.rb
sewing_kit-0.5.5 lib/sewing_kit/railtie.rb
sewing_kit-0.5.4 lib/sewing_kit/railtie.rb
sewing_kit-0.5.3 lib/sewing_kit/railtie.rb
sewing_kit-0.5.2 lib/sewing_kit/railtie.rb
sewing_kit-0.5.1 lib/sewing_kit/railtie.rb
sewing_kit-0.5.0 lib/sewing_kit/railtie.rb