Sha256: c6c05c0386e805343f442a65feb639a2ed5a248781da445d85f65e41b87c8ffe

Contents?: true

Size: 801 Bytes

Versions: 2

Compression:

Stored size: 801 Bytes

Contents

namespace :assets do

  desc "Install node components"
  task :npm do
    on roles(:app) do
      within release_path do
        if fetch(:run_assets) && test("[ -e #{release_path}/package.json ]")
          execute :npm, :install, "--quiet"
        end
      end
    end
  end

  desc "Run the grunt command"
  task :grunt do
    on roles(:app) do
      within release_path do
        if fetch(:run_assets) && test("[ -e #{release_path}/Gruntfile.js ]")
          execute fetch(:grunt_cmd)
        end
      end
    end
  end

  # probs wont work
  desc "Run the bower command"
  task :bower do
    on roles(:app) do
      within release_path do
        execute :bower, "install"
      end
    end
  end
  
  before 'deploy:publishing', 'assets:npm'
  before 'deploy:publishing', 'assets:grunt'

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cap-laravel-0.0.7 lib/cap/tasks/assets.rake
cap-laravel-0.0.6 lib/cap/tasks/assets.rake