简体   繁体   English

如何在单个文件上运行rdoc而不覆盖所有其他文件?

[英]How do you run rdoc on single files without overwriting all other files?

I am working on a very large rails project and I want to standardize the usage of rdoc in the codebase. 我正在做一个非常大的Rails项目,我想在代码库中标准化rdoc的用法。 I figured I could run it once over the whole project (to at least generate docs for the classes and methods themselves) and then devs can add single files as they add documentation. 我认为我可以在整个项目中运行一次(至少为类和方法本身生成文档),然后开发人员可以在添加文档时添加单个文件。

The problem is that if I run rdoc /path/to/some_file.rb , it then removes all other files from the generated index.html , and only includes the one. 问题是,如果我运行rdoc /path/to/some_file.rb ,它将从生成的index.html删除所有其他文件,并且仅包括其中一个。 Running rdoc on the whole project takes 3-4 minutes and it shouldn't be necessary to parse the entire project every time new comments are added. 在整个项目上运行rdoc大约需要3-4分钟,并且每次添加新注释时都不必解析整个项目。 The output of rdoc --help provides no solutions. rdoc --help的输出没有提供解决方案。

Is there a way to configure rdoc such that it will always persist docs until I specifically run rdoc over those files again? 有没有一种方法可以配置rdoc,使其始终保留文档,直到我再次对这些文件再次运行rdoc为止?

Thanks for any insight! 感谢您的见解!

I don't think rdoc removes anything from index.html , just overwrites it and isn't actually capable of modifying it. 我认为rdoc不会从index.html删除任何内容,只会覆盖它而实际上不能修改它。 Regarding performance, I'm not 100% sure but most likely rdoc doesn't cache the parse results. 关于性能,我不确定100%,但很可能rdoc不会缓存解析结果。 Yard does, with -c, --use-cache option, and it speeds up things significantly. Yard使用-c, --use-cache选项,确实可以加快处理速度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为(所有)Rails生成RDOC? - How do I generate RDOC for (all of) Rails? 如何使用rake为特定插件生成rDoc - How do you generate rDoc for a particular plugin using rake 如何在以后安装gems的ri和rdoc文件? - How can I install ri and rdoc files for gems afterwards? 您如何预编译除一个以外的所有Javascript文件? - How do you Precompile all Javascript Files except One? 如何在Rails 4应用程序中路由至batman.js(batman-rails)控制器而又不覆盖所有其他路由? - How do I route to a batman.js (batman-rails) controller in a rails 4 application without overwriting all other routes? 你如何在 Rails 3 中组织 javascript 文件? - How do you organize javascript files in Rails 3? 如何运行文件夹种子中的所有文件? - How to run all files in folder seeds? 如何在不使用任何yaml文件的情况下设置第二个数据库连接? - How do you set up a second database connection without the use of any yaml files? 无法运行单个规格文件 - Unable to run single spec files 如何防止capistrano覆盖用户在自己的文件夹中上传的文件? - How do I prevent capistrano from overwriting files uploaded by users in their own folders?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM