documentation
documentation copied to clipboard
can't generate proper clean docs
I am trying using the following command: documentation build ./packages/* -f html -o docs --shallow
It generates some docs that looks quite weird and it takes quite some time to generate doc. I would like to ignore all the dependencies and only generate doc from the main files. Wondering if the command I am running is right?
For some reason if I remove --shallow
from the command it complains about not able to find x module hence I added --shallow
The folder project structure looks like below:
/packages
/package1
/node_modules
/src
index.js
utils.js
/package.json
/package2
/node_modules
/src
index.js
utils.js
package.json
I use version 13.1.0
Running thru CLI
Thank you,
Could you try to be more specific than "quite weird"? For maintainers, this is really not a very good way to start an issue - there's absolutely no way that I could know what you mean by "weird".
It sounds like you have a pretty odd setup. I would recommend either:
- Run documentation in each directory and point it at src.
- Or use a glob that targets src in each directory. For example,
./packages/*/src/*
The command you're using tells the tool to document everything under packages, and your node_modules are installed under packages, so it's looking at all your node_modules.
is there a way to exclude the node_modules?
by weird I mean the docs generated shows some random stuff which I also dont know what they are exactly, probably coming from the libraries/dependecies used? Not sure!
The glob that I recommended will exclude it.
So do you mean I should run a command such as: documentation build ./packages/*/src/* -f html -o docs --shallow
instead?
I am getting error like:
SyntaxError: Unexpected token, expected ";" (2:14) at _temp._raise (/Users/lf/Desktop/work/xyz/node_modules/documentation/node_modules/@babel/parser/lib/index.js:799:17)
after running documentation build ./packages/*/src/* -f html -o docs --shallow
@tmcw was wondering can we configure the include and exclude directories thru some config json file or smth similiar, currently having to use the glob patter the commands can become quite complex and not readable!