https://github.com/chadhietala/fs-graph-diff
https://github.com/chadhietala/fs-graph-diff
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chadhietala/fs-graph-diff
- Owner: chadhietala
- Created: 2016-04-24T07:21:13.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-09T07:01:39.000Z (about 8 years ago)
- Last Synced: 2025-02-10T08:23:07.553Z (4 months ago)
- Language: TypeScript
- Size: 242 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FS Graph Diff
The purpose of this module is to return a list of files in a retained dependency graph.
Given:
```
dummy/index.js
dummy/foo.js
dummy/bar.js
dummy/bizz.js
dummy/routes/application.js
dummy/routes/leaf.js
```Parse all of the files in the list and return the connected graph:
```
"dummy/bizz" -> "dummy/bar"
"dummy/bizz" -> "dummy/foo"
"dummy/foo" -> "dummy/bar"
"dummy/index" -> "dummy/foo"
"dummy/routes/application" -> "dummy/foo"
"dummy/routes/application" -> "dummy/routes/leaf"
```
If the files list then becomes:
```
dummy/index.js
dummy/foo.js
dummy/bar.js
dummy/bizz.js
```The graph should detect that the files were removed and re-resolve the graph giving you:
```
"dummy/bizz" -> "dummy/bar"
"dummy/bizz" -> "dummy/foo"
"dummy/foo" -> "dummy/bar"
"dummy/index" -> "dummy/foo"
```