makedocs

1.0.0 • Public • Published

makedocs

自动创建文档工具

Install

npm install -g makedocs

usage

cd your_project_dir
makedoc build [file]

config file

必须在需要编译的文件夹内存在一个指定或者默认的配置文件。默认的文件名为makedoc.js

options

  • files 指定合并文件列表
  • template 文档模板文件地址
  • output 文档输出地址

template maker

我们创建自定义模板,使用的是ejs模板引擎。

  • render {function} arguments:
    • html 子模板HTML
    • id 当前类ID
    • text 当前类名称
  • html 模板编译的HTML代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<ul>
<%- render(function(html, id, text){
    return '<li><a href="#' + id + '">' + text + '</a><ul>' + html + '</ul></li>';
})%>
</ul>
<%-html%>
</body>
</html>

注意 render方法的具体使用。

Readme

Keywords

Package Sidebar

Install

npm i makedocs

Weekly Downloads

1

Version

1.0.0

License

none

Last publish

Collaborators

  • evio