Guest User

Untitled

a guest
Oct 17th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #
  2. # Jekyll Generator for SCSS
  3. #
  4. # (File paths in this description relative to jekyll project root directory)
  5. # Place this file in ./_plugins
  6. # Place .scss files in ./_scss
  7. # Compiles .scss files in ./_scss to .css files in whatever directory you indicated in your config
  8. # Config file placed in ./_sass/config.rb
  9. #
  10.  
  11. require 'sass'
  12. require 'pathname'
  13. require 'compass'
  14. require 'compass/exec'
  15.  
  16. module Jekyll
  17.  
  18. class CompassGenerator < Generator
  19. safe true
  20.  
  21. def generate(site)
  22. Dir.chdir File.expand_path('../_sass', File.dirname(__FILE__)) do
  23. Compass::Exec::SubCommandUI.new(%w(compile)).run!
  24. end
  25. end
  26.  
  27. end
  28.  
  29. end
Add Comment
Please, Sign In to add comment