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

Documentation of all nested files of nested sub folders #2235

Closed
foulong opened this issue Apr 11, 2023 · 8 comments
Closed

Documentation of all nested files of nested sub folders #2235

foulong opened this issue Apr 11, 2023 · 8 comments
Labels
bug Functionality does not match expectation

Comments

@foulong
Copy link

foulong commented Apr 11, 2023

Search terms

nested sub folder

Expected Behavior

src/
   bin/
   controllers/
      api/
         file_one.ts
      engine/
         file_two.ts
   routes/
      api/

Explore all nested files of nested sub folders in "src" folder :

./node_modules/typedoc/bin/typedoc src/**/*.ts --out doc --skipErrorChecking

file_one.ts and file_two.ts files will be included in the generated documentation.

Actual Behavior

Explore only files in "src" folder, not in nested sub folder of "src" folder :

./node_modules/typedoc/bin/typedoc src/**/*.ts --out doc --skipErrorChecking

file_one.ts and file_two.ts files aren't included in the generated documentation.


Explore only files in sub folder of a first level of depth of "src" folder, not in nested sub folder of "src" folder

./node_modules/typedoc/bin/typedoc src/**/**/*.ts --out doc --skipErrorChecking

file_one.ts and file_two.ts files aren't included in the generated documentation.

Steps to reproduce the bug

.

Environment

  • Typedoc version: 0.23.25
  • TypeScript version: 4.9.5
  • Node.js version: 14.18.1
  • OS: Windows 11

Thx a lot in advance.

PS : for the moment, i use this workaround :

./node_modules/typedoc/bin/typedoc src/*.ts src/*/*.ts src/*/*/*.ts src/*/*/*/*.ts src/*/*/*/*/*/*.ts --out doc --skipErrorChecking
@foulong foulong added the bug Functionality does not match expectation label Apr 11, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 15, 2023

Based on what you said went wrong, I suspect your shell - not typedoc - is expanding the globs. If you run ./node_modules/typedoc/bin/typedoc "src/**/*.ts" (with quotes), you'll prevent your shell from expanding the globs and pass them to TypeDoc to do the work.

Incidentally, in testing this to make sure it worked correctly, I found a bug with a single directory being passed to TypeDoc, so even if you'd have done this in 0.24.1, it wouldn't have worked properly!

@foulong
Copy link
Author

foulong commented Apr 19, 2023

Thx for your response.

It doesn't work. I have errors.

With single quote :

./node_modules/typedoc/bin/typedoc 'src/**/*.ts' --out doc --skipErrorChecking
TypeDoc exiting with unexpected error:
Error: ENOENT: no such file or directory, scandir 'E:/project01/src/**'
    at Object.readdirSync (fs.js:1047:3)
    at glob ......................

With double quotes :

./node_modules/typedoc/bin/typedoc "src/**/*.ts" --out doc --skipErrorChecking
TypeDoc exiting with unexpected error:
Error: ENOENT: no such file or directory, scandir 'E:/project01/src/**'
    at Object.readdirSync (fs.js:1047:3)
    at glob ......................

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 19, 2023

Did you upgrade typedoc? Before 0.24.4 the expansion is broken

@foulong
Copy link
Author

foulong commented Apr 23, 2023

Hi @Gerrit0,

i upgrade to 0.24.5 version.
I have no longer errors (with single and double quotes).
But, it explores only files in "src" folder, not in nested sub folder of "src" folder (with single and double quotes).

For the moment, i must ever use my workaround.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 23, 2023

I'm going to have to ask for a reproduction, it seems to work correctly for me

@Gerrit0 Gerrit0 reopened this Apr 23, 2023
@foulong
Copy link
Author

foulong commented Apr 23, 2023

$ ./node_modules/typedoc/bin/typedoc 'src/**/*.ts' --out ./doc --skipErrorChecking
[warning] NeatCsvComplement, defined in ./src/controllers/engine/_common.ts, is referenced by controllers/engine/_common.NeatCsvComplement but not included in the documentation.
[warning] ObjectCustomClass, defined in ./src/controllers/engine/_common.ts, is referenced by controllers/engine/_common.ObjectCustom but not included in the documentation.
[warning] Could not empty the output directory.
[info] Documentation generated at ./doc

The documentation is no longer generated in my output folder.
I see this problem because i delete content of my output foler ("doc").
And now, my output folder stays empty.
A warning talks about "[warning] Could not empty the output directory." but why ?

And my workaround doesn't work correctly (start but doesn't end).

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 23, 2023

I suspect permissions issues. If you manually delete the output directory, that might resolve it

@foulong
Copy link
Author

foulong commented Apr 25, 2023

Hello @Gerrit0,

i deleted my output directory "doc" manually (with windows explorer) when i posted my message on sunday.

New information :
if i change the name of ouput directory, it works ! if i run again the command, doc overwrites the previous version and works correctly.

EDIT : i reboot my computer because a lock was on my "doc" folder. It works now on "doc" folder. Thx @Gerrit0
U can close this issue, if u want.

@Gerrit0 Gerrit0 closed this as completed Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

2 participants