[前][次][番号順一覧][スレッド一覧]

ruby-changes:67098

From: aycabta <ko1@a...>
Date: Tue, 10 Aug 2021 02:39:00 +0900 (JST)
Subject: [ruby-changes:67098] d082510429 (master): [ruby/rdoc] Add "rake clean" task to erase generated parser files

https://git.ruby-lang.org/ruby.git/commit/?id=d082510429

From d082510429c9b9f39656e5faf811f06677de1dd3 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Mon, 9 Aug 2021 21:03:27 +0900
Subject: [ruby/rdoc] Add "rake clean" task to erase generated parser files

https://github.com/ruby/rdoc/commit/4e3e635afa
---
 lib/rdoc/Rakefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/rdoc/Rakefile b/lib/rdoc/Rakefile
index fb00a27..278972e 100644
--- a/lib/rdoc/Rakefile
+++ b/lib/rdoc/Rakefile
@@ -90,6 +90,12 @@ task "#{path}.gem" => package_parser_files https://github.com/ruby/ruby/blob/trunk/lib/rdoc/Rakefile#L90
 desc "Generate all files used racc and kpeg"
 task :generate => parsed_files
 
+task :clean do
+  parsed_files.each do |path|
+    File.delete(path) if File.exist?(path)
+  end
+end
+
 begin
   require 'rubocop/rake_task'
 rescue LoadError
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]