Skip to content

Instantly share code, notes, and snippets.

@cbfrance
Created August 1, 2014 23:49
Show Gist options
  • Save cbfrance/8b818517828a8d0a9b80 to your computer and use it in GitHub Desktop.
Save cbfrance/8b818517828a8d0a9b80 to your computer and use it in GitHub Desktop.
GRAY="\[\033[1;30m\]"
LIGHT_GRAY="\[\033[0;37m\]"
CYAN="\[\033[0;36m\]"
LIGHT_CYAN="\[\033[1;36m\]"
NO_COLOUR="\[\033[0m\]"
def colorprinter(ansi_code, content)
puts ansi_code #Build an ansi code for the terminal
puts content # output the content you want colorized
puts "\e[0m" #end the code
end
desc "Render docs directory"
task :docs do
colorprinter GRAY, "Building project '#{project_name}' docs with Styledocco ..."
colorprinter LIGHT_CYAN, "See: https://github.com/jacobrask/styledocco"
colorprinter GRAY, styledocco_compile
colorprinter GRAY, "Reading your annotated Sass files in #{annotated_stylesheets_input} ..."
colorprinter CYAN, "Going to output your new docs in #{docs_output} ..."
puts LIGHT_CYAN
system styledocco_compile
system "ls #{File.join(docs_output, '*')}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment