JSPM

recipe-doc

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q24308F
  • License MIT

a cli tool and export comment for recipe

Package Exports

  • recipe-doc

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (recipe-doc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

recipe-doc

apidoc 注释抽取命令行工具, 导出的数据可以直接发送给 recipe 生成项目。

快速开始

# 全局安装 recipe-doc 命令行工具
$ npm i recipe-doc -g
# 显示帮助
$ recipe-doc --help

  Usage: recipe-doc [options] <path>

  a cli tool and export comment for recipe


  Options:

    -V, --version                 output the version number
    -p, --project <project_path>  project path
    -e, --export [export_path]    comments data export path
    -n, --name <file_name>        export file name (default: recipe.json)
    -c, --conf <config_file>      config file name (default: .reciperc)
    -h, --help                    output usage information

首先应在项目的根目录下新建一个 .reciperc 的配置文件,配置文件内容如下

{
  "isPublis": false,                  // 项目 api 文档是否公开
  "creator": {
    "type": "individual",             // 可选值为 individual(个人项目) 或 collective(团队项目)
    "name": "yaokui.xiong@ele.me"     // 若为个人项目,请提供个人对应的饿了么邮箱,否则提供团队名称
  },
  "dirs":"src"                        // 抽取注释的目录,可以为数组
}

注释遵循 apidoc 规范,上面工作准备完后:

$ recipe-doc -p ${project_path}

执行完成后,就可以在 recipe 看到你生成的项目啦。