Comments (7)
Hi @donaldpipowitch - thanks for all the issues and PRs you have filed recently. It is very helpful for me to see other use cases and views of people who are working with dgeni.
This is a very good question.
The way I see these things is that each file that will be output is created from a single doc. Each doc is just a JavaScript object with properties, which can be basic strings or complex objects in their own right.
So if you want to render a single file containing everything then you simply create a processor that will create a single doc that contains a property which is a collection the individual docs. Then you returna new docs
array containing only this new doc.
You would provide a special template for this doc which will iterate over the collection and render each of the items accordingly.
This processor needs to run before the render-docs
pseudo-processor.
I think we should add some kind of "table of contents" doc to this example project to illustrate this.
from dgeni-example.
Thank you for the response. I'll try to create such a processor. Don't know when I'll have time for this, though.
FYI: I encourage splitting up every material element from the Angular repo into a single repo (see angular/material#161). Maybe this could be a good use case for this: every element creates one help page and a parent repository which refers to all elements include a "frame" for these help pages with navigation, etc. This could look like the current documentation (https://material.angularjs.org/), but the navigation would be generated solely from the elements referenced as dependencies and adding/removing a new element to the documentation would be a simple change in the bower.json
or package.json
.
from dgeni-example.
By the way we do this sort of thing already in the AngularJS docs in a couple of the processors: apiDocs.js
creates a new module
doc for each module in the codebase and in it there is a list of all the components; also we have a component-generate.js
processor which does similar but only for specific types of components (e.g. directives, etc).
from dgeni-example.
Hi @petebacondarwin, I'm sorry, I can't find either apiDocs.js
nor component-generate.js
? Could you create a minimal example how to solve this? Thank you.
from dgeni-example.
https://github.com/angular/dgeni-packages/blob/master/ngdoc/processors/apiDocs.js#L55-L92
and
Although in my latest refactorings these have been moved around a bit. See https://github.com/angular/dgeni-packages/tree/partialIds
from dgeni-example.
Ah! I've looked in the Angular repository itself for these, not inside dgeni-packages. Thank you!
from dgeni-example.
I know why I was confused. You said
we do this sort of thing already in the AngularJS docs
and I thought you would refer to the AngularJS GitHub repo and not dgeni-packages/ngdocs. The reason for this is that I though ngdocs would be for general projects based on Angular, but it seems that is spe
from dgeni-example.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dgeni-example.