Sha256: c2b079f8c1ea3beca9bc9e26ccf2888837ce437ca12ee45ad60024bbcd2fefdb

Contents?: true

Size: 773 Bytes

Versions: 7

Compression:

Stored size: 773 Bytes

Contents

namespace :shoelace do
  namespace :icons do
    desc "Copy Shoelace icons to the assets path"
    task copy: :environment do
      cp_r Rails.root.join(Shoelace::Railtie.config.shoelace.dist_path, "assets").to_s, Rails.public_path
    end

    desc "Remove Shoelace icons"
    task clobber: :environment do
      rm_rf File.join(Rails.public_path, "assets/icons")
    end
  end
end

# Make sure `yarn install` is run before running `shoelace:icons:copy`.
if Rake::Task.task_defined?("javascript:build")
  Rake::Task["shoelace:icons:copy"].enhance(["javascript:build"])
end

if Rake::Task.task_defined?("assets:precompile")
  Rake::Task["assets:precompile"].enhance(["shoelace:icons:copy"])
else
  Rake::Task.define_task('assets:precompile' => ['shoelace:icons:copy'])
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
shoelace-rails-0.8.0 lib/tasks/shoelace.rake
shoelace-rails-0.7.0 lib/tasks/shoelace.rake
shoelace-rails-0.6.2 lib/tasks/shoelace.rake
shoelace-rails-0.6.1 lib/tasks/shoelace.rake
shoelace-rails-0.6.0 lib/tasks/shoelace.rake
shoelace-rails-0.5.0 lib/tasks/shoelace.rake
shoelace-rails-0.4.1 lib/tasks/shoelace.rake