Sha256: 4cf3301ec63796bd65364a460e828b97563a36940fec832cc0a859456d5db93d

Contents?: true

Size: 909 Bytes

Versions: 9

Compression:

Stored size: 909 Bytes

Contents

require "bundler/setup"
require "fileutils"
require "rspec/core/rake_task"
require "bundler/gem_tasks"
require "sprockets/standalone"

# Test tasks
RSpec::Core::RakeTask.new(:spec)

namespace :spec do
  task coverage: :"assets:remove" do
    ENV["COVERAGE"] = "true"
    Rake::Task["spec"].invoke
  end
end

task default: :spec

# Release tasks
Sprockets::Standalone::RakeTask.new(:assets) do |task, sprockets|
  require_relative "app/config/sprockets"

  task.assets   = %w(app.js app.css *.eot *.svg *.ttf *.woff *woff2)
  task.sources  = %w(app/assets)
  task.output   = "app/public/assets"
  task.compress = true
  task.digest   = false
  task.environment = Octodmin.sprockets
end

namespace :assets do
  task :remove do
    FileUtils.rm_r("./tmp/sprockets", force: true)
    FileUtils.rm_r("./app/public/assets", force: true)
  end
end

Rake::Task["build"].enhance([:"assets:remove", :"assets:compile"])

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
octodmin-0.3.5 Rakefile
octodmin-0.3.4 Rakefile
octodmin-0.3.3 Rakefile
octodmin-0.3.2 Rakefile
octodmin-0.3.1 Rakefile
octodmin-0.3.0 Rakefile
octodmin-0.2.1 Rakefile
octodmin-0.2.0 Rakefile
octodmin-0.1.0 Rakefile