Sha256: 25996ff04c335522babf7cee08ab2e1cda0d589c5fc9be751ebe98e93c8e76aa

Contents?: true

Size: 818 Bytes

Versions: 3

Compression:

Stored size: 818 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 '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

3 entries across 3 versions & 1 rubygems

Version Path
lux_assets-0.2.2 ./lib/vendor/tasks.rb
lux_assets-0.2.1 ./lib/vendor/tasks.rb
lux_assets-0.1.10 ./lib/vendor/tasks.rb