Sha256: b28f34a0f10821d8e7cd1cc7a345537b8dc42e5b08b69c9e4f1eba6c72815429

Contents?: true

Size: 704 Bytes

Versions: 33

Compression:

Stored size: 704 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")

      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

33 entries across 33 versions & 3 rubygems

Version Path
webpacker-4.3.0 lib/webpacker/runner.rb
webpacker-5.1.1 lib/webpacker/runner.rb
webpacker-5.1.0 lib/webpacker/runner.rb
webpacker-5.0.1 lib/webpacker/runner.rb
webpacker-5.0.0 lib/webpacker/runner.rb
jetpacker-0.4.2 lib/webpacker/runner.rb
jetpacker-0.4.1 lib/webpacker/runner.rb
jetpacker-0.4.0 lib/webpacker/runner.rb
jetpacker-0.3.0 lib/webpacker/runner.rb
jetpacker-0.2.0 lib/webpacker/runner.rb
webpacker-4.2.2 lib/webpacker/runner.rb
webpacker-4.2.1 lib/webpacker/runner.rb
webpacker-4.2.0 lib/webpacker/runner.rb
webpacker-4.1.0 lib/webpacker/runner.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/webpacker-4.0.7/lib/webpacker/runner.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/webpacker-4.0.7/lib/webpacker/runner.rb
webpacker-4.0.7 lib/webpacker/runner.rb
webpacker-4.0.6 lib/webpacker/runner.rb
webpacker-4.0.5 lib/webpacker/runner.rb
webpacker-4.0.4 lib/webpacker/runner.rb