Sha256: 0d18eb17fe15b17c7917acf0b1f133baa40088073e799276b5ca1dc138a4dd73

Contents?: true

Size: 1.16 KB

Versions: 26

Compression:

Stored size: 1.16 KB

Contents

require "bundler/gem_tasks"
require 'sass/util'
require 'sass/script'
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
  desc 'Compile assets for Bower and manual download'
  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

26 entries across 26 versions & 1 rubygems

Version Path
upjs-rails-0.8.0 Rakefile
upjs-rails-0.7.8 Rakefile
upjs-rails-0.7.7 Rakefile
upjs-rails-0.7.6 Rakefile
upjs-rails-0.7.5 Rakefile
upjs-rails-0.7.4 Rakefile
upjs-rails-0.7.3 Rakefile
upjs-rails-0.7.2 Rakefile
upjs-rails-0.7.1 Rakefile
upjs-rails-0.7.0 Rakefile
upjs-rails-0.6.5 Rakefile
upjs-rails-0.6.4 Rakefile
upjs-rails-0.6.3 Rakefile
upjs-rails-0.6.2 Rakefile
upjs-rails-0.6.1 Rakefile
upjs-rails-0.6.0 Rakefile
upjs-rails-0.5.0 Rakefile
upjs-rails-0.4.4 Rakefile
upjs-rails-0.4.3 Rakefile
upjs-rails-0.4.2 Rakefile