Sha256: 6877c5b7ca40589e263731db2907aa964cbb5a05e68ac609e9fc2322b67b1e0d
Contents?: true
Size: 1.07 KB
Versions: 2
Compression:
Stored size: 1.07 KB
Contents
require "bundler/gem_tasks" require 'sprockets/standalone' module Upjs module Assets MANIFESTS = %w(up.js up.css) SOURCES = %w(lib/assets/javascripts lib/assets/stylesheets) OUTPUT = 'dist' end end Sprockets::Standalone::RakeTask.new(:source_assets) do |task, sprockets| task.assets = Upjs::Assets::MANIFESTS task.sources = Upjs::Assets::SOURCES task.output = Upjs::Assets::OUTPUT task.compress = false task.digest = false sprockets.js_compressor = nil sprockets.css_compressor = nil end Sprockets::Standalone::RakeTask.new(:minified_assets) do |task, sprockets| task.assets = Upjs::Assets::MANIFESTS task.sources = Upjs::Assets::SOURCES task.output = Upjs::Assets::OUTPUT task.compress = false task.digest = false sprockets.js_compressor = :uglifier sprockets.css_compressor = :sass end namespace :assets do task :compile do Rake::Task['minified_assets:compile'].invoke File.rename('dist/up.js', 'dist/up.min.js') File.rename('dist/up.css', 'dist/up.min.css') Rake::Task['source_assets:compile'].invoke end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
upjs-rails-0.2.1 | Rakefile |
upjs-rails-0.2.0 | Rakefile |