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

--exclude option not working? #467

Closed
jmlopez-rod opened this issue Apr 4, 2017 · 2 comments
Closed

--exclude option not working? #467

jmlopez-rod opened this issue Apr 4, 2017 · 2 comments

Comments

@jmlopez-rod
Copy link

I'm having trouble generating documentation for one of our projects. The basic file structure goes as follows:

├─── .editorconfig 
├─── .gitignore
├─── .npmignore
├─┬ examples
│ ├-- otherTsFiles
├─┬ src 
│ ├─┬ main
│ │ └── index.ts
│ └─┬ test
│   └── index.ts
├─── Makefile
├─── tsconfig.json 
├─── tslint.json 

In other projects I've obtain good results by first changing directory to src then executing the command.

cd src;
../node_modules/.bin/typedoc 
  --out ../docs main
  --target es5 
  --mode modules
  --module commonjs
  --hideGenerator
  --excludePrivate
  --name 'project $(VERSION)'

Unfortunately I am unable to do that again since I need my tsconfig to enable decorators.

The new way I'm attempting to do is

./node_modules/.bin/typedoc
  --out ./docs ./src/main
  --target es5
  --mode modules
  --module commonjs
  --hideGenerator
  --exclude examples/ --excludePrivate
  --name 'project $(VERSION)'

I'm having issues understanding the exclude flag. Somehow the documeation makes everything including the files in the examples and the src/tests directories. Is there a way to only document the files that are within src/main?

Or, if I could switch to the main directory and execute the command, is there a way to specify the tsconfig file?

@nickzelei
Copy link
Contributor

This was fixed in #387, it's just awaiting release I believe.

@jmlopez-rod
Copy link
Author

You are right, I think it has been released since I did see that code. My problem was that I did not know how to minimatch. I think I fixed it for now, but I do wish there was a way of specifying a directory where to grab the sources. Currently typedoc is reading the sources from my tsconfig. I thought that

--out ./docs ./src/main

Would get the docs from only files in ./src/main but this doesn't seem to be the case.

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

No branches or pull requests

3 participants