Sha256: 2d839fbaf0b5cd7725048869101e5d1ac6d0d85df8a27d3ea7180fd64122eb10

Contents?: true

Size: 910 Bytes

Versions: 10

Compression:

Stored size: 910 Bytes

Contents

require 'colorize'

$lux_assets_bin ||= proc do |command|
  bin     = Pathname.new(__dir__).join('../../bin/lux_assets').to_s
  system '%s %s' % [bin, command]
end

namespace :assets do
  desc 'Clear all assets'
  task :clear do
    $lux_assets_bin.call :clear
  end

  desc 'Install all needed packages via yarn'
  task :install do
    $lux_assets_bin.call :install
  end

  desc 'Compile assets to public/assets and generate mainifest.json'
  task compile: :env do
    LuxAssets.compile_all do |name, path|
      puts "Compile #{name.green} -> #{path}"
    end
  end

  desc 'Show all files/data in manifest'
  task show: :env do
    LuxAssets.examine
  end

  desc 'Monitor for file changes'
  task monitor: :env do
    LuxAssets::Cli.monitor
  end

  desc 'Upload assets to S3'
  task :s3_upload do
    puts 'aws s3 sync ./public s3://bucket.location --cache-control "max-age=31536000, public"'
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
lux_assets-0.2.24 ./lib/vendor/tasks.rb
lux_assets-0.2.23 ./lib/vendor/tasks.rb
lux_assets-0.2.21 ./lib/vendor/tasks.rb
lux_assets-0.2.20 ./lib/vendor/tasks.rb
lux_assets-0.2.19 ./lib/vendor/tasks.rb
lux_assets-0.2.15 ./lib/vendor/tasks.rb
lux_assets-0.2.14 ./lib/vendor/tasks.rb
lux_assets-0.2.11 ./lib/vendor/tasks.rb
lux_assets-0.2.9 ./lib/vendor/tasks.rb
lux_assets-0.2.4 ./lib/vendor/tasks.rb