How can I add IgnorePath for yuidoc

699 Views Asked by At

While generating document form yuidoc I want to ignore downloaded javascript libraries inside lib folder of my project. How can I place that into ignore list I tried "ignorePaths": [ "./lib" ], "ignorePaths": [ "./lib/*.js" ], "ignorePaths": [ "lib" ]

still it's compiles my javascript library files.

2

There are 2 best solutions below

0
On

I'm adding an answer with a little more detail since I ran into this problem yesterday and it could be helpful to someone else.

As @slolife mentioned, you should be using "exclude".

The value for "exclude" needs to be a String of comma separated directories (not Array). This can be done via your JSON config file as one of the "options" or as a command-line argument.

Single Directory Examples

JSON Config File

{
    "name": "My Project",
    "options": {
        "exclude": "lib"
    }
}

Command-line

yuidoc . -x "lib"


Multiple Directories Examples

NOTE: NO spaces between directories in the list

JSON Config File

{
    "name": "My Project",
    "options": {
        "exclude": "lib,lib2"
    }
}

Command-line

yuidoc . -x "lib","lib2"

Reference: http://yui.github.io/yuidoc/args/index.html

2
On

Instead, try using the exclude option as discussed here https://github.com/yui/yuidoc/issues/5

"exclude" : ["lib"]