Comments (6)
Thanks for your very fast response.
What is the reason you want to keep them from your diagram?
I'm using the dependency graph to visualize the architecture; builtin node modules are not part of that.
I see you --excluded vscode. Is that to avoid cluttering your diagram with the complete contents of the vscode-extension-telemetry module? In that case collapsing stuff in node_modules with --do-not-follow might help out.
I excluded vscode because it doesn't tell the viewer much; arepl-vscode is a vscode extension, so of course it is going to reference vscode. VSCode made the diagram too busy visually. And yes, I didn't want the vscode-extension-telemetry module either. I'm not using --do-not-follow because that excludes python-shell, which is a important part of arepl-backend.
Ugh, I just realized I'm one of those terrible customers with ultra-specific use-cases XD.
I've recently added a more richly coloured version of the dot reporter (rcdot) you might like better
I like the blue in rcdot but the red is a bit glaring.
b.t.w. I wish your project would've been around when I still wrote python - looks like a live-saver 👍
Thanks :D
Your project is really cool too, I wish all projects had a visual call graph rather than just a tangled mess of 1000+ line files.
from dependency-cruiser.
hi @Almenon, a good question - definitely not apparent from the documentation. I'll add it to the FAQ.
B.t.w.: => What is the reason you want to keep them from your diagram?
how to ditch core modules from the output
Currently the only way to --exclude (/--do-not-follow) core modules in diagrams is with a regex. Typically something like ^[a-zA-Z0-9\_]+$
works (because typically only core modules resolve to something without path separators).
depcruise --do-not-follow node_modules --exclude "vscode|^[a-zA-Z0-9\_]+$" --output-type dot src | dot -T svg > dependencygraph.svg
B.t.w. dependency-cruiser indeed recognises core modules on a conceptually clearer level. Within rules it is possible to match core modules -
core
is one of the dependency types there.
- I'll see if there's a more elegant way to do this (it might become an addition to the .dependency-cruiser.json format).
Looking at your cli & diagram...
- I see you --excluded
vscode
. Is that to avoid cluttering your diagram with the complete contents of thevscode-extension-telemetry
module? In that case collapsing stuff in node_modules with--do-not-follow
might help out. - I've recently added a more richly coloured version of the dot reporter (
rcdot
) you might like better
command line:
depcruise --do-not-follow "node_modules" --exclude "^[a-zA-Z0-9\_]+$" --output-type rcdot src | dot -T svg > dependencygraph.svg
from dependency-cruiser.
b.t.w. I wish your project would've been around when I still wrote python - looks like a live-saver 👍
from dependency-cruiser.
Hello. I'm having the same issue. I'd like to exclude the core modules from the graph. I tried your suggestion to --exclude "^[a-zA-Z0-9_]+$" and it works. However, doing that also removes orphan modules, which I'd like to keep. Is there a way to remove the core modules while keeping the orphans?
I've attached a screenshot. As you can see, --exclude "^[a-zA-Z0-9_]+$" removes the assert core module, but also removes the inventory.js orphan module.
Thank you so much for creating dependency-cruiser!
from dependency-cruiser.
Thanks for raising this @OlegAlexander - it is indeed unexpected as the exclude pattern doesn't match inventory.js
. Can you share the complete command line script you used?
from dependency-cruiser.
@OlegAlexander I've reproduce the issue and created a new one for it #80 . I'll investigate (& hopefully come up with a fix) in the course of this week.
from dependency-cruiser.
Related Issues (20)
- Issue: numberOfDependentsLessThan does not calculate dependents properly when index.ts is used inbetween HOT 5
- Feature request: Allow to have rules checking Typescript types but also rules that ignore Typescript types HOT 2
- Issue: false positive for couldNotResolve for type only package HOT 5
- Question: A dependency view of each "TYPE" or "INTERFACE" HOT 3
- Question: monorepo, combinedDependencies & not-dev-dep HOT 2
- Error: No "exports" main defined in <project_name>/node_modules/dependency-cruiser/package.json HOT 3
- What am I missing about rcdot? "'rcdot' is not a valid output type" HOT 2
- Issue: not-to-unresolvable return error when using typescript alias in module project HOT 2
- Why doesn't dependency-cruiser "ignore" my private-registry package like it does with node-modules? HOT 6
- Q: Dep Graph for each file HOT 3
- Feature request: consider symlinked workspaces HOT 5
- Issue: not-to-spec and not-to-dev-dep default config should include tsx and jsx HOT 3
- Issue: using `workspace:` to implement nohoist in a package.json while using pnpm throws an error HOT 4
- Missing mermaid example HOT 1
- Feature request: reporters might report `comment` of rules other than `forbidden` HOT 3
- Issue: cruise API - breaking changes HOT 4
- Question: Resolving typescript source files imported from outside specified package HOT 2
- Question: dependency-cruiser API gives a different result when `baseDir` is changed HOT 6
- Question: Can I access the classes/methods/functions in modules? HOT 4
- Listing dependancy tree via dependency-cruiser gives me the reference from barel files HOT 2
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 dependency-cruiser.