문제

I've spent the last 4 days trying to get yuidoc to parse my javascript framework and it's really starting to drive me nuts.

here is my json config file

{ 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' } }

It is parsing the json config and there are no errors. Here is the output:

$ 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
$

I can get it to work using command line and default settings for output and theme but it does not have my project build and version info. The Bootstrap theme is on Github and does work. I am using Cygwin 64 Bit on windows 7 64 bit.

I have... - Checked line endings - Copy and pasted yuidocs examples with minimum editing - tried command line every which way - verified all paths and directories exist

HELP! Why is there no errors and no output.

도움이 되었습니까?

해결책

I think that there's a bug in YUIDoc when it comes to applying custom configurations.

Try adding an 'output' attribute with an 'outdir' entry in your configuration JSON.

E.g. something like:

{
  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'
    }
  }
}

다른 팁

Create yuidoc.json like

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

and run in your terminal

c://user/test> yuidoc . -c yuidoc.json --server  <js filder path ex: ./example> 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top