Sha256: 7651ec8c7e8329005c9517900c75f0c36fe87d22723bb7ec11e51401adc7e061
Contents?: true
Size: 1.09 KB
Versions: 3
Compression:
Stored size: 1.09 KB
Contents
def process_config if (config = ENV['CONFIG'] || config = ENV['CONFIGURATION']) && !Sprocket.configurations.include?(config) raise "Configuration #{config} doesn't exist. Valid configurations: #{Sprocket.configurations.to_sentence}." end return config end namespace :sprockets do desc "Generate and install the Sprockets concatenated JavaScript file for all configuration groups. Generate and install for a specific configuration by specifying CONFIG=<name>." task :install_script => :environment do if config = process_config Sprocket.new(config).install_script else Sprocket.configurations.each { |configuration| Sprocket.new(configuration).install_script } end end desc "Install any assets provided by Sprockets script, for all configuration groups. Install assets for a specific configuration by specifying CONFIG=<name>." task :install_assets => :environment do if config = process_config Sprocket.new(config).install_assets else Sprocket.configurations.each { |configuration| Sprocket.new(configuration).install_assets } end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
dm-sprockets-rails-0.0.2 | tasks/sprockets_tasks.rake |
sprockets-rails-0.0.1 | tasks/sprockets_tasks.rake |
sprockets-rails-0.0.0 | tasks/sprockets_tasks.rake |