metamaps--metamaps/lib/tasks/extensions.rake

20 lines
476 B
Ruby
Raw Permalink Normal View History

2016-09-24 03:00:46 +00:00
# frozen_string_literal: true
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?
end
end
2017-10-15 18:02:22 +00:00
# run before
Rake::Task[:'assets:precompile'].enhance([:'assets:js_compile'])
2017-10-15 18:02:22 +00:00
# run after
Rake::Task[:'assets:precompile'].enhance do
Rake::Task[:'assets:production_ready'].invoke
end