Sha256: 7e6d56aed58bf2a9430dc253157e13b511e36b6547f7b38d2659b4070c73bca0

Contents?: true

Size: 803 Bytes

Versions: 18

Compression:

Stored size: 803 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/webpack.config.js")
      @webpacker_config      = ENV["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

18 entries across 18 versions & 1 rubygems

Version Path
shakapacker-6.5.1 lib/webpacker/runner.rb
shakapacker-6.5.0 lib/webpacker/runner.rb
shakapacker-6.4.1 lib/webpacker/runner.rb
shakapacker-6.4.0 lib/webpacker/runner.rb
shakapacker-6.3.0 lib/webpacker/runner.rb
shakapacker-6.3.0.pre.rc.1 lib/webpacker/runner.rb
shakapacker-6.2.1 lib/webpacker/runner.rb
shakapacker-6.2.0 lib/webpacker/runner.rb
shakapacker-6.1.1 lib/webpacker/runner.rb
shakapacker-6.1.0 lib/webpacker/runner.rb
shakapacker-6.1.0.beta.0 lib/webpacker/runner.rb
shakapacker-6.0.2 lib/webpacker/runner.rb
shakapacker-6.0.1 lib/webpacker/runner.rb
shakapacker-6.0.0 lib/webpacker/runner.rb
shakapacker-6.0.0.rc.14 lib/webpacker/runner.rb
shakapacker-6.0.0.rc.13 lib/webpacker/runner.rb
shakapacker-6.0.0.rc.12 lib/webpacker/runner.rb
shakapacker-6.0.0.rc.6 lib/webpacker/runner.rb