English | 简体中文
A plugin for vscode to view your project's dependency graph
- Show dependency graph show dependency graph by analyze the project file.
- Save dependency tree data save dependency tree data to local json file.
- Export dependency graph img export dependency graph's
svg
orpng
. - Extract basic information from file extract file's
type,line,introduction,description
to display. - Extract function and comment from code file extract code file's
function
andcomment
to display.
Search dependencygraph
in extensions marketplace, download the extension in the following figure.
Use .vsix
file install extension offline.
Set entry file path in webview
.
Set entry file path in setting file(setting file path is .dependencygraph/setting.json
).
Set Resolve extensions
or Resolve alias
in webview
.
Add Resolve alias
in input box, split by ,
. set Resolve alias
and Resolve path
click insert button to add item and don't forget click Confirm
.
Set Resolve extensions
or Resolve alias
in setting file(setting file path is .dependencygraph/setting.json
).
The extension recognizes information
and description
what is written in the following ways.
/**
* @introduction This is introduction
*
* @description This is description\n this sentences will show next row
*/
File type | .js | .ts | .jsx | .tsx | .vue | .scss | .less | .sass | .py | .php | .go |
---|---|---|---|---|---|---|---|---|---|---|---|
Support status | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
- Read entry file as string, get
introduction
anddescription
byregular expression
. - Use babel parser to get code file's
AST
. get file dependencies byimport
andrequire
value from analyzeAST
. - Use enhanced-resolve to get dependencies absolute path by value of
import
,require
and file's absolute path. set dependencies absolute path to file queue. - Analyze file queue to get whole dependency tree.
To build a graph like visual studio class view
for developer to view and analyze dependency tree
or module relationship
.
install necessary dependency packages.
watch file change and build file.
press F5
in vscode to start dev process.
You can find test case in tests. use yarn test
to start testing.
Please give a ⭐️ if this project helped you!
If you have any questions or requests or want to contribute to DependencyGraph
, please write the issue or give me a Pull Request freely.
If you find a bug, please report to us opening a new Issue on GitHub.