Sha256: 80dc1597e40818ae62104c4e136c5dcb1322109660c7bb24f0008c0e6042586e

Contents?: true

Size: 366 Bytes

Versions: 4

Compression:

Stored size: 366 Bytes

Contents

require "rake"

module Webpacker::Compiler
  extend self

  def compile
    compile_task.invoke
    compile_task.reenable
  end

  private
    def compile_task
      @compile_task ||= load_rake_task("webpacker:compile")
    end

    def load_rake_task(name)
      @load_rakefile ||= Rake.load_rakefile(Rails.root.join("Rakefile"))
      Rake::Task[name]
    end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
webpacker-legacy-0.1.2 lib/webpacker/compiler.rb
webpacker-legacy-0.1.1 lib/webpacker/compiler.rb
webpacker-legacy-0.1.0 lib/webpacker/compiler.rb
webpacker-2.0 lib/webpacker/compiler.rb