Sha256: 0f0f9d4d6dc3c0cc0488045017505ba05bd81cb716d929c93f489319f55c1053

Contents?: true

Size: 1.33 KB

Versions: 6

Compression:

Stored size: 1.33 KB

Contents

require 'active_support/ordered_options'

namespace :half_pipe do

  half_pipe = ActiveSupport::OrderedOptions.new

  task :clean do
    Rake::Task["half_pipe:environment"].invoke
    Rake::Task["half_pipe:execute_grunt_command"].invoke("clean")
  end

  task :execute_grunt_command, [:command] => ["half_pipe:environment",
                                              "half_pipe:generate_grunt_runner"] do |_,params|
    half_pipe.grunt_command = "#{half_pipe.grunt_runner} #{params[:command]}"
    puts "executing: #{half_pipe.grunt_command.inspect}"
    exec half_pipe.grunt_command
  end

  task :generate_grunt_runner do
    paths = %W(#{half_pipe.cwd} node_modules .bin grunt)
    half_pipe.grunt_runner = File.join(*paths)
  end

  task :environment do

    # For great Capistrano
    half_pipe.cwd = (respond_to?(:release_path) ? release_path : Dir.pwd)

  end

  namespace :precompile do

    task :noop

    task :all do
      Rake::Task["half_pipe:environment"].invoke
      Rake::Task["half_pipe:execute_grunt_command"].invoke("build")
    end

  end

  desc "Precompile half-pipe-managed assets"
  task :precompile => ["half_pipe:precompile:all"]

end

task "assets:precompile" => ["half_pipe:precompile"]
task "assets:clean" => ["half_pipe:clean"]
task "assets:clobber" => ["half_pipe:clean"]
task "assets:environemnt" => ["half_pipe:environment"]

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
half-pipe-0.3.0.alpha.3 lib/tasks/assets.rake
half-pipe-0.3.0.alpha.2 lib/tasks/assets.rake
half-pipe-0.3.0.alpha.1 lib/tasks/assets.rake
half-pipe-0.2.4 lib/tasks/assets.rake
half-pipe-0.2.3 lib/tasks/assets.rake
half-pipe-0.2.2 lib/tasks/assets.rake