houdini/bin/webpack

24 lines
530 B
Text
Raw Permalink Normal View History

2019-11-05 22:39:13 +00:00
#!/usr/bin/env ruby
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
ENV["NODE_ENV"] ||= "development"
require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
require "bundler/setup"
require "webpacker"
require "webpacker/webpack_runner"
2021-03-12 20:32:36 +00:00
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
end
2019-11-05 22:39:13 +00:00
APP_ROOT = File.expand_path("..", __dir__)
Dir.chdir(APP_ROOT) do
2021-03-12 20:32:36 +00:00
system!("rake i18n:js:export")
2019-11-05 22:39:13 +00:00
Webpacker::WebpackRunner.run(ARGV)
end