Sha256: 814bcf043eb11aa7a4adfb010096dffbc9124bf0c93e5e1be08b5fe90db842ad
Contents?: true
Size: 841 Bytes
Versions: 21
Compression:
Stored size: 841 Bytes
Contents
# frozen_string_literal: true require "rake" require "json" namespace :assets do desc "Remove 'node_modules' folder" task rm_node_modules: :environment do Rails.logger.info "Removing node_modules folder" FileUtils.remove_dir("node_modules", true) end desc "Upload sourcemap to Honeybadger" task publish_sourcemap: :environment do Rails.logger.info "Publishing sourcemap" NeetoCommonsBackend::SourceMapPublishService.new.process! end desc "Remove 'node_modules' folder and upload sourcemap to Honeybadger" task post_compilation: :environment do skip_clean = %w[no false n f].include?(ENV["WEBPACKER_PRECOMPILE"]) unless skip_clean Rake::Task["assets:rm_node_modules"].invoke Rake::Task["assets:publish_sourcemap"].invoke if Rails.env.production? || Rails.env.staging? end end end
Version data entries
21 entries across 21 versions & 1 rubygems