簡體   English   中英

yuidoc解析但沒有輸出也沒有錯誤

[英]yuidoc parses but no output and no errors

我花了最后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示例-嘗試命令行的每種方式-驗證所有路徑和目錄是否存在

救命! 為什么沒有錯誤也沒有輸出。

我認為在應用自定義配置時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'
    }
  }
}

像這樣創建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> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM