Created
November 26, 2012 20:33
-
-
Save morewry/4150439 to your computer and use it in GitHub Desktop.
Compass config with styledocco to generate styleguide on compile
This file contains 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
# we have a separate build process that strips comments & minifies, so I use production mode here to generate the styleguide | |
project_path = File.dirname(__FILE__) + "/" | |
utils_dir = "utilities/" | |
utils_path = project_path + utils_dir | |
output_style = (compiletype == :production) ? :expanded : :nested | |
# callback - on_stylesheet_saved | |
on_stylesheet_saved do |filename| | |
if File.exists?(filename) | |
if (compiletype == :production) | |
# Generate new documentation | |
styleguide(filename, utils_path + "styledocco.bat") | |
end | |
end | |
end | |
# fn - Generate styleguide documentation with styledocco | |
# http://jacobrask.github.com/styledocco/ | |
def styleguide(filename, script) | |
if File.exists?(filename) | |
sleep 1 | |
puts "Generating documentation/styleguide" | |
system script + " " + filename | |
end | |
end |
This file contains 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
@echo off | |
set projdir=%~d0%~p0 | |
:start | |
styledocco --name "REMAX.com" --out docs --include docs/preview.css css/all.css --verbose | |
shift | |
if NOT x%1==x goto start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment