Sha256: 1109d7521342f0719fba20b34da5930be296f19bf7535fd38ef8b3641d63a010

Contents?: true

Size: 780 Bytes

Versions: 25

Compression:

Stored size: 780 Bytes

Contents

module Webpacker
  class Runner
    def self.run(argv)
      $stdout.sync = true

      new(argv).run
    end

    def initialize(argv)
      @argv = argv

      @app_path              = File.expand_path(".", Dir.pwd)
      @node_modules_bin_path = ENV["WEBPACKER_NODE_MODULES_BIN_PATH"] || `yarn bin`.chomp
      @webpack_config        = File.join(@app_path, "config/webpack/#{ENV["NODE_ENV"]}.js")
      @webpacker_config      = File.join(@app_path, "config/webpacker.yml")

      unless File.exist?(@webpack_config)
        $stderr.puts "webpack config #{@webpack_config} not found, please run 'bundle exec rails webpacker:install' to install Webpacker with default configs or add the missing config file for your custom environment."
        exit!
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/webpacker/runner.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/webpacker/runner.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/webpacker/runner.rb
jetpacker-0.7.0 lib/webpacker/runner.rb
webpacker-5.4.4 lib/webpacker/runner.rb
jetpacker-0.6.0 lib/webpacker/runner.rb
webpacker-5.4.3 lib/webpacker/runner.rb
webpacker-5.4.2 lib/webpacker/runner.rb
webpacker-5.4.1 lib/webpacker/runner.rb
webpacker-5.4.0 lib/webpacker/runner.rb
webpacker-5.3.0 lib/webpacker/runner.rb
webpacker-5.2.2 lib/webpacker/runner.rb
webpacker-6.0.0.beta.7 lib/webpacker/runner.rb
webpacker-6.0.0.beta.6 lib/webpacker/runner.rb
webpacker-6.0.0.beta.5 lib/webpacker/runner.rb
webpacker-6.0.0.beta.4 lib/webpacker/runner.rb
webpacker-6.0.0.beta.3 lib/webpacker/runner.rb
jetpacker-0.5.0 lib/webpacker/runner.rb
webpacker-6.0.0.beta.2 lib/webpacker/runner.rb
webpacker-6.0.0.beta.1 lib/webpacker/runner.rb