Code Monkey home page Code Monkey logo

Comments (6)

Almenon avatar Almenon commented on July 28, 2024 1

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.

sverweij avatar sverweij commented on July 28, 2024

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

dot with

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 the vscode-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

screen shot 2018-08-26 at 00 08 06

from dependency-cruiser.

sverweij avatar sverweij commented on July 28, 2024

b.t.w. I wish your project would've been around when I still wrote python - looks like a live-saver 👍

from dependency-cruiser.

OlegAlexander avatar OlegAlexander commented on July 28, 2024

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.

dependencycruiserexcludecoremodules

Thank you so much for creating dependency-cruiser!

from dependency-cruiser.

sverweij avatar sverweij commented on July 28, 2024

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.

sverweij avatar sverweij commented on July 28, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.