annotate bin/webpack-dev-server @ 468:802dcd44188e

Now with webpacker
author nanaya <me@nanaya.pro>
date Sun, 23 Feb 2020 20:23:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
468
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
1 #!/usr/bin/env ruby
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
2
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
3 ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
4 ENV["NODE_ENV"] ||= "development"
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
5
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
6 require "pathname"
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
7 ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
8 Pathname.new(__FILE__).realpath)
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
9
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
10 require "bundler/setup"
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
11
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
12 require "webpacker"
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
13 require "webpacker/dev_server_runner"
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
14
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
15 APP_ROOT = File.expand_path("..", __dir__)
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
16 Dir.chdir(APP_ROOT) do
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
17 Webpacker::DevServerRunner.run(ARGV)
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
18 end