Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top