Question about ng-doc integration into your app #70
-
Hi, I've been reading through the documentation and I'm trying to understand a few concepts:
After reading the docs, when using |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Perhaps my confusion is this part at the start of the installation guide:
Does it mean to say that I should have a new angular app just for the docs? And then I reference things from my "real" app in the docs app module? Is that it? |
Beta Was this translation helpful? Give feedback.
-
Overall, yes, initially it was assumed that you would need to create a separate application to display the documentation, in which you would describe the process of working with the library or application and everything necessary. I think the documentation for the application can be created as a separate application. It should not be a problem if you are using a monorepo. This way, you will gain flexibility. For example, you can publish it on a specific domain for developers only and have faster builds. It is also important to understand that I mentioned the monorepo not by chance because NgDoc requires access to the source code for proper functioning. NgDoc cannot generate documentation or display demos based on compiled code and source maps. If we are talking about a single application where both the documentation and the application itself exist simultaneously, while the documentation is excluded from production builds, I believe it is possible. You can exclude a part of the application using However, as you mentioned earlier, you have a custom |
Beta Was this translation helpful? Give feedback.
-
This clarifies it for me. Thank you! As a suggestion I'd say the docs could use some clarification on this point. I've been reading through https://ng-doc.com/docs/getting-started/what-is-ng-doc and these things weren't immediately obvious to me. And as you've said, I was thinking I could probably have the docs in the app and do some angular magic to exclude it from the final build as well as separate the ng-doc stuff into it's own module (as hinted in parts of the docs). However I wasn't sure what was the intention/the recommended path. I think an extension of the docs to clarify this and your comment about making sure the docs app is on the same repo as the app it is documenting is important. Perhaps obvious to some but I think it's a worth addition to the docs. PS- If you do decide to update the docs I would avoid using the word monorepo since I've had colleagues react negatively to anything associated to that word. Plus, in your comment I believe you only used that word to mean that both the docs app and the app being documented must be in the same repo, not that necessarily there would be many more apps in the repo. |
Beta Was this translation helpful? Give feedback.
-
Regarding the support for extra webpack config. As you've said that goes away as soon as I create a separate app for the docs so I'm not sure there's even a real need here to be fulfilled. Perhaps it would be wise to hold on it until you get more people asking about it? |
Beta Was this translation helpful? Give feedback.
Overall, yes, initially it was assumed that you would need to create a separate application to display the documentation, in which you would describe the process of working with the library or application and everything necessary.
I think the documentation for the application can be created as a separate application. It should not be a problem if you are using a monorepo. This way, you will gain flexibility. For example, you can publish it on a specific domain for developers only and have faster builds.
It is also important to understand that I mentioned the monorepo not by chance because NgDoc requires access to the source code for proper functioning. NgDoc cannot generate documentation …