Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow excluding specific files #319

Open
Marshallx opened this issue Feb 18, 2015 · 7 comments
Open

Allow excluding specific files #319

Marshallx opened this issue Feb 18, 2015 · 7 comments

Comments

@Marshallx
Copy link

The ignorePaths and exclude options do not allow excluding specific files from the docs.

Example:
I want to include "src/a/hello.js" but exclude "src/b/hello.js"

For now it looks like I'm going to have to write a script to copy all the stuff I want to a separate folder just to create the docs.

Why not use a .gitignore style solution?

@okuryu
Copy link
Member

okuryu commented Feb 19, 2015

exclude option works for me as follow.

{
    "options": {
        "exclude": "src/b"
    }
}

@Marshallx
Copy link
Author

Exactly that doesn't work for me - the file is still processed and gives a bunch of warnings.

@okuryu
Copy link
Member

okuryu commented Feb 20, 2015

I cannot reproduce your problem. Could you provide reproducible example?

@Marshallx
Copy link
Author

Not a lot more I can tell you, tried this "real" example:
exclude: "internet/punycode.js"
And, because "punycode.js" does not use yuidoc's exact syntax, I get a load of warnings on the command line.
If I change the config to
exclude: "punycode.js"
Then I don't get any warnings.

Nevermind if I'm the only one having this problem - I've switched to JSDoc now in any case.

@okuryu
Copy link
Member

okuryu commented Feb 20, 2015

exclude option is comma separated list of directories by design. You're able to use it as follows.

{
    "options": {
        "exclude": "internet"
    }
}

Please let me know if it doesn't works.

@Marshallx
Copy link
Author

Yeah, that works. But there is no way to exclude
internet/punycode.js
whilst still including other files in internet/*.js
without excluding
some-other-folder/punycode.js

@okuryu
Copy link
Member

okuryu commented Feb 21, 2015

Okay, I think supporting glob pattern is nice. I'll take a look detail. Of course, patch welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants