juanallo / vscode-dependency-cruiser Goto Github PK
View Code? Open in Web Editor NEWvscode extension to generate a dependency graph from any JS file
License: MIT License
vscode extension to generate a dependency graph from any JS file
License: MIT License
It would be nice if folders containing typescript files were also supported. I really like this app.
I've configured my tsconfig.json
with a baseUrl
set to ./app/javascript
. So I write import { foo } from 'utility'
and it imports from ./app/javascript/utility
. Dependency Cruiser, however, sees utility
as a top-level import and shows me a graph like this:
It would be really great to see Dependency Cruiser follow Babel/TS/Webpack/whatever's config for base paths and show imports like utility
coming from the right place. Here's a non-exhaustive list of details that would need to be addressed:
utility
, which is in ./app/javascript/utility
, and react
, which is in ./node_modules/react
.tsconfig.json
supports baseUrl
as well as specific path aliases using paths
(e.g., @utility
--> ./app/javascript/utility
).jsconfig.json
has options similar to tsconfig.json
but for VS Code (doesn't depend on TS).module-resolver
plugin has root
and alias
config options.resolve
options.Perhaps the easiest way to handle the myriad cases is to simply create baseUrl
, paths
and externals
settings in the plugin's config and allow users to manually specify the base path, aliases and any external module declarations.
One last consideration: if you let users declare the base path, they will probably need to give an absolute path since VS Code could be launched from whatever pwd. Not sure whether there's a way around that.
It'd be useful to be able to visualize what files depend on the current file. I've been looking through dependency cruiser's docs but it's not immediately clear to me yet how to go about that. If I figure it out I'll submit a PR.
Its not an issue, but i wwould love to be able to export at least a JPEG from the dependenciy-view its generated. :)
Hello, I use this extension.
Default of maxDepth is 0 level. I want see more depth. how can i do?
AFAIK depcheck by far is the most comprehensive tool for analyzing dependency tree, does this extension only detect js files? Would be great to describe it in readme. I have had the idea for depcheck extension some time ago…
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.