Skip to content

Instantly share code, notes, and snippets.

@fgarcia
Created September 25, 2014 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fgarcia/b108d06ec954bf613876 to your computer and use it in GitHub Desktop.
Save fgarcia/b108d06ec954bf613876 to your computer and use it in GitHub Desktop.
#rake tasks for #sprockets
require 'sprockets/../rake/sprocketstask'
RACK_ENV = ENV['RACK_ENV'] ||= ENV['RACK_ENV'] ||= 'production' unless defined?(RACK_ENV)
SPROCKETS='production'
Rake::SprocketsTask.new do |t|
manifest_path = File.expand_path('../public/assets/manifest.json', __FILE__)
t.environment = SPROCKETS
t.output = File.expand_path('../public/assets', __FILE__)
t.manifest = Sprockets::Manifest.new(SPROCKETS, manifest_path)
t.assets = %w(application.js application.css)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment