Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6b2de55e37
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (26 sloc) 0.836 kb
require 'bundler/gem_tasks'
require 'bundler/setup'
require 'rake/sprocketstask'
require 'tentd-admin/sprockets/environment'
require 'uglifier'
Rake::SprocketsTask.new do |t|
t.environment = Sprockets::Environment.new
%w{ javascripts stylesheets images }.each do |path|
t.environment.append_path("assets/#{path}")
end
t.environment.js_compressor = Uglifier.new
t.output = "./public/assets"
t.assets = %w( application.js application.css chosen-sprite.png )
t.environment.context_class.class_eval do
include SprocketsHelpers
end
end
task :gzip_assets => :assets do
Dir['public/assets/**/*.*'].reject { |f| f =~ /\.gz\z/ }.each do |f|
sh "gzip -c #{f} > #{f}.gz" unless File.exist?("#{f}.gz")
end
end
task :deploy_assets => :gzip_assets do
require './config/asset_sync'
AssetSync.sync
end
Jump to Line
Something went wrong with that request. Please try again.