diff options
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r-- | railties/lib/rails/tasks/framework.rake | 2 | ||||
-rw-r--r-- | railties/lib/rails/tasks/routes.rake | 2 | ||||
-rw-r--r-- | railties/lib/rails/tasks/yarn.rake | 11 |
3 files changed, 11 insertions, 4 deletions
diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index d42d001b1a..f5586b53f0 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -1,5 +1,3 @@ -require "active_support/deprecation" - namespace :app do desc "Update configs and some other initially generated files (or use just update:configs or update:bin)" task update: [ "update:configs", "update:bin", "update:upgrade_guide_info" ] diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake index 04daaf4a83..215fb2ceb5 100644 --- a/railties/lib/rails/tasks/routes.rake +++ b/railties/lib/rails/tasks/routes.rake @@ -1,5 +1,3 @@ -require "active_support/deprecation" -require "active_support/core_ext/string/strip" # for strip_heredoc require "optparse" desc "Print out all defined routes in match order, with names. Target specific controller with -c option, or grep routes using -g option" diff --git a/railties/lib/rails/tasks/yarn.rake b/railties/lib/rails/tasks/yarn.rake new file mode 100644 index 0000000000..2097b7ffef --- /dev/null +++ b/railties/lib/rails/tasks/yarn.rake @@ -0,0 +1,11 @@ +namespace :yarn do + desc "Install all JavaScript dependencies as specified via Yarn" + task :install do + system('./bin/yarn install --no-progress') + end +end + +# Run Yarn prior to Sprockets assets precompilation, so dependencies are available for use. +if Rake::Task.task_defined?("assets:precompile") + Rake::Task["assets:precompile"].enhance [ "yarn:install" ] +end |