Skip to content

Check for webpacker being installed by having config file #677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/tasks/webpacker/check_binstubs.rake
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
namespace :webpacker do
desc "Verifies that bin/webpack & bin/webpack-dev-server are present."
task :check_binstubs do
unless File.exist?("bin/webpack") && File.exist?("bin/webpack-dev-server")
$stderr.puts "Webpack binstubs not found.\n"\
"Have you run rails webpacker:install ?\n"\
unless File.exist?("config/webpacker.yml")
$stderr.puts "config/webpacker.yml not found.\n"\
"If using the default webpacker setup, have you run rails webpacker:install ?\n"\
"Make sure the bin directory or binstubs are not included in .gitignore\n"\
"Otherwise, please manually create a config/webpacker.yml file.\n"\
"Exiting!"
exit!
end
Expand Down