2016-09-24 03:00:46 +00:00
|
|
|
# frozen_string_literal: true
|
2017-11-25 19:23:47 +00:00
|
|
|
|
2016-08-08 13:58:23 +00:00
|
|
|
namespace :assets do
|
|
|
|
task :js_compile do
|
2016-09-24 03:00:46 +00:00
|
|
|
system 'npm install'
|
|
|
|
system 'npm run build'
|
2017-10-14 19:02:41 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
task :production_ready do
|
2016-10-04 15:43:42 +00:00
|
|
|
system 'bin/build-apidocs.sh' if Rails.env.production?
|
2017-10-14 19:02:41 +00:00
|
|
|
Rake::Task['perms:fix'].invoke if Rails.env.production?
|
2016-08-08 13:58:23 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Rake::Task[:'assets:precompile'].enhance([:'assets:js_compile'])
|
2017-10-14 19:02:41 +00:00
|
|
|
Rake::Task[:'assets:precompile'].enhance([:'assets:production_ready'])
|