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

Version Path
neeto-commons-backend-1.0.109 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.108 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.107 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.106 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.105 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.104 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.103 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.102 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.101 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.100 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.99 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.98 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.97 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.96 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.95 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.94 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.93 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.92 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.91 lib/neeto_commons_backend/tasks/assets.rake
neeto-commons-backend-1.0.90 lib/neeto_commons_backend/tasks/assets.rake