From ace2e4f531c0563615e4ddf7bdc9edb641cc72fc Mon Sep 17 00:00:00 2001 From: Matt Wildig Date: Tue, 25 Mar 2014 22:23:14 +0000 Subject: [PATCH] Add Sass processing of docs css files This was removed in bcc3dd84d0997932c592a0baec702c8bfb53fd04 but is still needed. --- Gemfile | 1 + Rakefile | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 5cccb231..19f3af7f 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ gemspec group :docs do gem "yard", "~> 0.8.0" gem "kramdown" + gem "sass" end platform :mri do diff --git a/Rakefile b/Rakefile index 7b219d42..f58c00be 100644 --- a/Rakefile +++ b/Rakefile @@ -54,6 +54,16 @@ begin end namespace :doc do + + task :sass do + require 'sass' + Dir["yard/default/**/*.sass"].each do |sass| + File.open(sass.gsub(/sass$/, 'css'), 'w') do |f| + f.write(Sass::Engine.new(File.read(sass)).render) + end + end + end + desc "List all undocumented methods and classes." task :undocumented do command = 'yard --list --query ' @@ -64,7 +74,7 @@ begin end desc "Generate documentation" - task(:doc) {sh "yard"} + task(:doc => 'doc:sass') {sh "yard"} desc "Generate documentation incrementally" task(:redoc) {sh "yard -c"}