Skip to content

Commit

Permalink
configure current dir for bin scripts
Browse files Browse the repository at this point in the history
That makes it possible to run webpack/webpack-dev-server scripts not
only from the app dir, e.g.:

$ path/to/my/app/bin/webpack-dev-server
  • Loading branch information
palkan committed Nov 20, 2018
1 parent 53c8a77 commit e2bc236
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/install/bin/webpack
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ require "bundler/setup"

require "webpacker"
require "webpacker/webpack_runner"
Webpacker::WebpackRunner.run(ARGV)

Dir.chdir(File.expand_path("../../", __FILE__)) do
Webpacker::WebpackRunner.run(ARGV)
end
5 changes: 4 additions & 1 deletion lib/install/bin/webpack-dev-server
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ require "bundler/setup"

require "webpacker"
require "webpacker/dev_server_runner"
Webpacker::DevServerRunner.run(ARGV)

Dir.chdir(File.expand_path("../../", __FILE__)) do
Webpacker::DevServerRunner.run(ARGV)
end

0 comments on commit e2bc236

Please sign in to comment.