Use a pure-Ruby search/replace for the documentation CSS.

This commit is contained in:
Nathan Weizenbaum 2013-10-15 17:31:54 -07:00
parent 65ca03170f
commit eb254a8dc9

View File

@ -44,8 +44,10 @@ task :sass_docs => :sass do
Dir.chdir(".sass") {bundle %{exec rake doc}}
sh %{rm -rf source/documentation}
sh %{cp -r .sass/doc source/documentation}
sh %{find source/documentation -name '*.html' } +
%{-exec sed 's/css\\/common\\.css/..\\/assets\\/css\\/docs.css/g' -i {} \\;}
Dir['source/documentation/**/*.html'].each do |path|
contents = File.read(path)
File.open(path, 'w') {|file| file.write(contents.gsub(%r{css/common\.css}, '../assets/css/docs.css'))}
end
end
desc "Import information from Sass."