1

この 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 の例をコピーして貼り付けました - あらゆる方法でコマンドラインを試しました - すべてのパスとディレクトリが存在することを確認しました

ヘルプ!エラーも出力もないのはなぜですか。

4

2 に答える 2

1

カスタム構成の適用に関しては、YUIDoc にバグがあると思います。

設定 JSON に「outdir」エントリを含む「output」属性を追加してみてください。

例:

{
  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'
    }
  }
}
于 2014-01-21T17:48:14.187 に答える
1

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> 
于 2014-05-12T12:12:48.597 に答える