mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Bring back :doc task
which has been removed at 11bb81149f
but still in need for generating a complete set of haml.info docs
This commit is contained in:
parent
c6e3f85a17
commit
7727346a49
1 changed files with 25 additions and 0 deletions
25
Rakefile
25
Rakefile
|
@ -112,5 +112,30 @@ task bench: :compile do
|
|||
exit system(*cmd)
|
||||
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 '
|
||||
command << '"object.docstring.blank? && '
|
||||
command << '!(object.type == :method && object.is_alias?)"'
|
||||
sh command
|
||||
end
|
||||
end
|
||||
|
||||
desc "Generate documentation"
|
||||
task(:doc => 'doc:sass') {sh "yard"}
|
||||
|
||||
desc "Generate documentation incrementally"
|
||||
task(:redoc) {sh "yard -c"}
|
||||
|
||||
task default: %w[compile hamlit:test]
|
||||
task test: %w[compile test:all]
|
||||
|
|
Loading…
Reference in a new issue