简体   繁体   English

如何自动生成基于 Yii 的 Web 应用程序的文档

[英]How do I auto generate documentation of Yii based web application

I have been developing a web app on Yii framework which has around 60% of the codes in javascript.我一直在用 Yii 框架开发一个 web 应用程序,它有大约 60% 的 javascript 代码。 During the development I could not create a simultaneous document of the functionality/code etc., but it just has unstructured comments written alongside the code.在开发过程中,我无法创建功能/代码等的同步文档,但它只是在代码旁边编写了非结构化的注释。

I would like to auto-generate a documentation of my web app in HTML document that displays the comments intermingled with code.我想在 HTML 文档中自动生成我的 Web 应用程序的文档,该文档显示与代码混合的注释。

  • I tried the yiidocumentor but the output is more of a documentation of Yii itself and it is not documenting javascript functions我尝试了 yiidocumentor 但输出更多的是 Yii 本身的文档,它没有记录 javascript 函数
  • Docco was seemingly the best solution but it is for nodejs based application and I tried using the port of Docco in php ( sourceMakeup ) but it is showing no results without showing any error. Docco似乎是最好的解决方案,但它适用于基于 nodejs 的应用程序,我尝试在 php ( sourceMakeup ) 中使用 Docco 的端口,但它没有显示任何结果而没有显示任何错误。 Also, in order to use sourceMakeup I had to move the files outside the Yii framework as I was not able to get it work within Yii framework.此外,为了使用 sourceMakeup,我不得不将文件移到 Yii 框架之外,因为我无法在 Yii 框架中使用它。

If anyone can provide some direction on auto-generating documentation from source-code and comments that would be of great help.如果有人可以提供有关从源代码和注释自动生成文档的一些指导,那将有很大帮助。

Big thanks !!非常感谢!!

我的建议是phpdoc .phpDocumentor 是一个可以从 PHP 源代码生成文档的工具。

I finally used Natural Docs because it is simple, efficient and supports many languages.我最终使用了Natural Docs,因为它简单、高效并且支持多种语言。 All that is required is a very minimal structure in comments ie所需要的只是注释中的一个非常小的结构,即

/*
 Function: Multiply

 Multiplies two integers.

 Parameters:

  x - The first integer.
  y - The second integer.

 Returns:

  The two integers multiplied together.

 See Also:

  <Divide>
*/

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

相关问题 如何为SAHI脚本生成Javadoc样式文档? - How do I generate Javadoc Style Documentation for SAHI scripts? 如何在解析服务器应用程序上生成文档 - how to generate documentation on parse server application 您如何基于表单生成网页? - How do you generate web pages based on a form? 如何拆分我的Web应用程序? - How do I split my web application? 从测试中自动生成文档(javascript、jest) - Auto generate documentation from tests (javascript, jest) 如何根据内容生成唯一的代码? - How do I generate a unique code based on the content? 如何根据选定的下拉项目生成项目列表? - How do I generate a list of items based on selected dropdown item? 如何根据父控件的范围生成子控制器? - How do I generate child controllers based on the scope of a parent control? 如何通过单击我的应用程序中的按钮生成新的锻炼? - How do I generate new workouts by clicking button in my application? PHP:如何从yii2的模块中访问Web目录中的.js和.csss? - PHP: How do I can access .js and .csss in Web dir from my Module in yii2?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM