diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-01-18 22:12:13 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-01-18 22:12:13 +0900 |
commit | 617fc7eada8de9d12df06fee2f7348cba8289faf (patch) | |
tree | 358287c0fdc3da277d93373a6c9309b3d8f1aa48 /railties/lib | |
parent | 8496d0c894b42832bcff65af3f5896cf43d77e36 (diff) | |
download | rails-617fc7eada8de9d12df06fee2f7348cba8289faf.tar.gz rails-617fc7eada8de9d12df06fee2f7348cba8289faf.tar.bz2 rails-617fc7eada8de9d12df06fee2f7348cba8289faf.zip |
only enhance when `assets:precompile` task is defined
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/tasks/yarn.rake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/tasks/yarn.rake b/railties/lib/rails/tasks/yarn.rake index 7c5e266e3e..e95bfe1da6 100644 --- a/railties/lib/rails/tasks/yarn.rake +++ b/railties/lib/rails/tasks/yarn.rake @@ -6,4 +6,6 @@ namespace :yarn do end # Run Yarn prior to Sprockets assets precompilation, so dependencies are available for use. -Rake::Task["assets:precompile"].enhance [ "yarn:install" ] +if Rake::Task.task_defined?("assets:precompile") + Rake::Task["assets:precompile"].enhance [ "yarn:install" ] +end |