Comments (6)
@brian428 if you check this output, you can see the blue deps which are classes (services).
Is that what you mean?
from ngd.
Well, yes...partly. Though for some reason I have a number of services and other injected classes that aren't showing up as blue dependencies like you're showing above. Does the graph only pick up providers declared on a given class (rather than singleton (global) or inherited providers)?
Beyond that, I think it would be useful to see other types as well (models, composed/aggregated classes and so on). I realize that could make the graph a lot bigger, so maybe it could be an optional flag. But being able to essentially see the relationships for all imported classes (or at least all imported non-framework classes) could be quite useful to identify issues with module decoupling and organization.
What do you think? Am I making sense? :-)
from ngd.
-
Yes, the tool crawls only the providers (hence the dependencies feature).
-
I am open to add this feature. However, I think this has to be behind flags. The developer should be able to choose what she/he wants to generate.
However, my priority for now would be to update the tool so it can handle TS 2.0
from ngd.
Right, that's what I inferred (about providers).
Given that, I'd say two key enhancements might be:
- To have it handle global/singleton providers that are configured in the application bootstrap. (Currently, it only seems to handle providers declared on individual components, right?)
- To use constructor arguments to determine a component's dependencies rather than relying only on the component's providers. What is shown right now, where only dependencies declared explicitly on the component as providers, is certainly useful. But in many cases, you're dealing with providers that are declared further up a component hierarchy (or bootstrapped at the app level), which are "lost" (to some degree) in the current dependency graph.
I'd have no problem with these options being exposed via flags though.
To be clear, I'm not disparaging what you've done...it's already very useful. As I said, I just think that being able to really see all of the dependencies, across the entire app, would also be very useful. In that light, the constructor params might be a more accurate way to determine the dependencies. Or to go even further, using the imports to truly visualize all of the dependencies.
Thanks!
from ngd.
Sure @brian428 I see your point ^^
Do you think you can send a PR so we can discuss more in details on the implementation?
from ngd.
I will see if I can take a stab at doing this, but it may take some time. Partly because I'm obviously not familiar with how you're actually doing this. And partly because I'm on the hook already for some other PRs on other projects (namely, the angular2-seed project). :-)
from ngd.
Related Issues (20)
- (bug): TypeError: Viz is not a function
- (feat) forRoot HOT 1
- add minimum distance between lines HOT 2
- Cannot enlarge memory arrays. HOT 13
- CLI Silent Option Doesn't Work HOT 1
- fix(): remove dependency on gulp-util from ngd-core pacakge HOT 1
- feat: move the build system to Bazel
- NGD unable to differentiate same component name in different moudles
- dot npm package vulnerability (npm audit failing) HOT 7
- parameter for layouting HOT 2
- parametr for filtering what element to render
- highlight the element or relationship on click
- AngularJS Dependency graph
- NGD does not recognise -l or --files option HOT 1
- Since 2.1, `@compodoc/ngd-transformer` now requires Node >= 12.17.0 HOT 2
- Plugin does not support tsconfig.json file with multi-line comments HOT 1
- Arbitrary Code Injection Vulnerability for dependency
- Max call stack size exceeded HOT 2
- Compodoc installation : Pb with ngd-tranformer which download "dot" 2.0.0 beta version
- Question: Is it possible to just show the dependency tree of a given component? HOT 1
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 ngd.