Rakefile in regextest-0.1.6 vs Rakefile in regextest-0.1.8
- old
+ new
@@ -3,11 +3,11 @@
RSpec::Core::RakeTask.new(:spec)
# task :default => :spec
-task :default => [:make, :spec]
+task :default => [:make, :doc, :spec]
# Generating parser
file 'lib/regextest/front/parser.rb' => 'lib/regextest/front/parser.y' do
puts 'making regextest/front/parser.rb'
sh 'racc lib/regextest/front/parser.y -o lib/regextest/front/parser.rb'
@@ -57,6 +57,18 @@
task :test => :make do
puts "Test it!"
sh 'ruby test.rb'
end
+# Generating documents
+file 'doc/index.html' => [ 'lib/regextest/regexp.rb', 'README.md' ] do
+ puts "making document for regextest"
+ sh 'yardoc lib/regextest/regexp.rb'
+end
+
+task :doc =>
+ [
+ 'doc/index.html',
+ ] do
+ puts "Generate documents"
+end