Skip to content

Instantly share code, notes, and snippets.

@guilleiguaran
Last active August 29, 2015 14:25
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 guilleiguaran/792623df101e756e6670 to your computer and use it in GitHub Desktop.
Save guilleiguaran/792623df101e756e6670 to your computer and use it in GitHub Desktop.
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