【问题标题】:yuidoc parses but no output and no errorsyuidoc 解析但没有输出也没有错误
【发布时间】:2014-01-25 08:34:01
【问题描述】:

过去 4 天我一直在尝试让 yuidoc 解析我的 javascript 框架,这真的让我抓狂了。

这是我的 json 配置文件

{ linkNatives: 'true',
  attributesEmit: 'true',
  paths: [ '..\\\\layers' ],
  outdir: '../docs/',
  port: 3000,
  nocode: true,
  extension: '.js',
  project:
   { name: '{NAME}',
     description: '{DESCRIPTION}',
     version: '1.0.0',
     url: 'http://docs.mysite.com/',
     logo: 'http://docs.mysite.com/img/logo.png',
     themedir: 'yuidoc-bootstrap-theme' } }

它正在解析 json 配置并且没有错误。这是输出:

$ yuidoc ../layers
info: (yuidoc): Starting YUIDoc@0.3.46 using YUI@3.9.1 with NodeJS@0.10.24
info: (yuidoc): Scanning for yuidoc.json file.
info: (yuidoc): Loading yuidoc.json data from:    C:\devtools\GitHub\Framework\tools\yuidoc.json
info: (yuidoc): Starting YUIDoc with the following options:
info: (yuidoc):
{ linkNatives: 'true',
  attributesEmit: 'true',
  paths: [ '..\\\\layers' ],
  outdir: '../docs',
  port: 3000,
  nocode: false,
  project:
   { name: '{NAME}',
     description: '{DESCRIPTION}',
     version: '1.0.0',
     url: 'http://docs.mysite.com/',
     logo: 'http://docs.mysite.com/img/logo.png',
     themedir: 'yuidoc-bootstrap-theme' } }
info: (yuidoc): YUIDoc Starting from: ..\\layers
Nlaak@Nlaak-PC /cygdrive/c/devtools/GitHub/Framework/tools
$

我可以使用命令行和输出和主题的默认设置让它工作,但它没有我的项目构建和版本信息。 Bootstrap 主题在 Github 上并且确实有效。我在 windows 7 64 位上使用 Cygwin 64 位。

我有... - 检查行尾 - 以最少的编辑复制和粘贴 yuidocs 示例 - 以各种方式尝试命令行 - 验证所有路径和目录存在

帮助!为什么没有错误也没有输出。

【问题讨论】:

    标签: javascript json twitter-bootstrap cygwin yuidoc


    【解决方案1】:

    我认为 YUIDoc 在应用自定义配置时存在错误。

    尝试在配置 JSON 中添加带有“outdir”条目的“输出”属性。

    例如类似:

    {
      linkNatives: 'true',
      attributesEmit: 'true',
      paths: ['..\\\\layers'],
      port: 3000,
      nocode: true,
      extension: '.js',
      project: {
        name: '{NAME}',
        description: '{DESCRIPTION}',
        version: '1.0.0',
        url: 'http://docs.mysite.com/',
        logo: 'http://docs.mysite.com/img/logo.png',
        themedir: 'yuidoc-bootstrap-theme',
        options: {
            outdir: '..\out'
        }
      }
    }
    

    【讨论】:

      【解决方案2】:

      像这样创建 yuidoc.json

      {
          "name": "yout title",    
          "version": "1.0.0",     
          "options": {                
              "outdir": "./docs"              
          }
      }
      

      并在您的终端中运行

      c://user/test> yuidoc . -c yuidoc.json --server  <js filder path ex: ./example> 
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-08-02
        • 2014-12-13
        • 2021-06-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多