diff options
author | Liceth Ovalles <liceova22@gmail.com> | 2016-10-31 17:03:41 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2016-11-28 12:11:08 -0500 |
commit | 9a95e13989380e59245d3d6fb0853953b806742c (patch) | |
tree | 4492bb3d2f6fe7eccb0639a7cca2d7f8be5addb3 | |
parent | 732702b56b4fcf4df374dee123fbce3b38e7a1a0 (diff) | |
download | rails-9a95e13989380e59245d3d6fb0853953b806742c.tar.gz rails-9a95e13989380e59245d3d6fb0853953b806742c.tar.bz2 rails-9a95e13989380e59245d3d6fb0853953b806742c.zip |
Run yarn on setup and update scripts.
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/bin/setup.tt | 5 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/bin/update.tt | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/bin/setup.tt b/railties/lib/rails/generators/rails/app/templates/bin/setup.tt index 8635e97b76..c82a922eef 100644 --- a/railties/lib/rails/generators/rails/app/templates/bin/setup.tt +++ b/railties/lib/rails/generators/rails/app/templates/bin/setup.tt @@ -16,8 +16,11 @@ chdir APP_ROOT do puts '== Installing dependencies ==' system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') -<% unless options.skip_active_record -%> +<% if options[:yarn] %> + system! 'yarn' +<% end %> +<% unless options.skip_active_record -%> # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') # cp 'config/database.yml.sample', 'config/database.yml' diff --git a/railties/lib/rails/generators/rails/app/templates/bin/update.tt b/railties/lib/rails/generators/rails/app/templates/bin/update.tt index d385b363c6..0d8ca2f902 100644 --- a/railties/lib/rails/generators/rails/app/templates/bin/update.tt +++ b/railties/lib/rails/generators/rails/app/templates/bin/update.tt @@ -16,8 +16,11 @@ chdir APP_ROOT do puts '== Installing dependencies ==' system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') -<% unless options.skip_active_record -%> +<% if options[:yarn] %> + system! 'yarn' +<% end %> +<% unless options.skip_active_record -%> puts "\n== Updating database ==" system! 'bin/rails db:migrate' <% end -%> |