0

我终于记录了Hotplate。我真的相信文档应该教,而不是告诉——如果你阅读了 Hotplate 中最初的 README.md,你就会明白我的意思。

但是,我确实认为我需要一些用于 Hotplate 的“讲述”文档(一旦您阅读了“教学”方面的内容,可以用作快速参考)。

目前,我的代码中有这个:

/**
 * Load all modules that are marked as "enabled"
 *
 * This function will require and register all modules in modulesFullPath
 * that satisfy the `filter` regexp.
 * 
 * modulesFullPath is actually optional: when not there, it defaults
 * to the node_modules directory belonging to the current instante of Hotplate
 * 
 * @param {filter} The regexp which will filter the modules to load
 * @param {modulesFullPath} (optional) The full path of the modules to load
 *
 * @api public
 */

我从另一个 NodeJS 项目中复制了这种格式。现在,问题:

“将这样的东西变成实际文档的最简单的方法是什么?”

考虑一下:

  • 热板由多个小型子模块组成。
  • 每个模块都有一个服务器“主”文件,它几乎可以完成所有工作
  • 每个模块都定义了一个或多个我想记录的“钩子”(类似于“已实现的钩子列表”)
  • 每个模块都可以调用几个钩子,我想记录这些钩子(类似于“调用钩子列表”)

那么,最简​​单、最自动化的方法是什么?

默克。

4

1 回答 1

1

YUIdoc非常擅长处理这种风格的评论并从中生成非常好的文档。

于 2013-09-18T07:18:11.347 回答