Skip to content

Instantly share code, notes, and snippets.

@guilleiguaran
Last active Aug 29, 2015
Embed
What would you like to do?
require 'sprockets'
project_root = File.expand_path(File.dirname(__FILE__))
assets = Sprockets::Environment.new(project_root) do |env|
env.logger = Logger.new(STDOUT)
env.register_transformer 'text/sass', 'text/css', Sprockets::SassCProcessor.new
end
assets.append_path(File.join(project_root, 'source', 'assets', 'stylesheets'))
puts assets.find_asset('application.css')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment