Last active
November 29, 2021 01:37
-
-
Save lucasmazza/4402036 to your computer and use it in GitHub Desktop.
The 20 something lines of Compass that I need.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'compass' | |
| require 'tmpdir' | |
| template = %Q{ | |
| @import "icons/*.png"; | |
| @include all-icons-sprites; | |
| } | |
| options = { | |
| :syntax => :scss, | |
| :line_comments => false, | |
| :cache => false, | |
| :force => true, | |
| :load_paths => [Compass::Frameworks[:compass].stylesheets_directory, Compass::SpriteImporter.new] | |
| } | |
| Compass.configuration do |config| | |
| config.sprite_load_path << Dir.pwd | |
| config.generated_images_path = Dir.pwd | |
| config.images_path = Dir.pwd | |
| config.on_sprite_saved do |filename| | |
| puts filename | |
| end | |
| end | |
| engine = Sass::Engine.new(template, options) | |
| puts engine.render |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment