Comments (5)
@austinm911 glad to know it helps you resolving circular dependencies problem. Note that this is not related to that issue, but I'm also planning to improve and add a lot more features around circular dependencies to help work with them :)
Going back to the initial issue, I can see how fast it can become harmful for the DX to have to restart everything when resolving circular dependencies or even when updating files. I'll think of a solution whether it's through auto-refresh or a manual action button and I'll let you know in that thread.
from skott.
Hello @austinm911, a --watch
flag was introduced in 0.32.0
I just published. When used in combination with --displayMode=webapp
, it will automatically refresh the graph using real-time events (no page reload). Let me know how it goes for you!
from skott.
Hello @austinm911,
Thanks for opening that feature request.
I thought about it in the past so I'm glad you're requesting it now, it confirms that this could be a useful feature.
I just to think a little bit about the specs that is to settle on what changes should trigger a restart, either it's only modifying files that are already part of the graph or also taking into account files that can be added outside of the scope of the initial graph.
I would say that given skott can use multiple types of entrypoints, probably the most reliable way would be to watch everything around skott's cwd (that can be configured) taking into account specified "fileExtensions", "ignorePattern" and ".gitignore" that should discard all the entries from skott's detection zone.
Also, do you expect other types of displayMode to restart on code change? Or only the webapp?
from skott.
Hello @austinm911,
Thanks for opening that feature request.
I thought about it in the past so I'm glad you're requesting it now, it confirms that this could be a useful feature.
I just to think a little bit about the specs that is to settle on what changes should trigger a restart, either it's only modifying files that are already part of the graph or also taking into account files that can be added outside of the scope of the initial graph.
I would say that given skott can use multiple types of entrypoints, probably the most reliable way would be to watch everything around skott's cwd (that can be configured) taking into account specified "fileExtensions", "ignorePattern" and ".gitignore" that should discard all the entries from skott's detection zone.
Also, do you expect other types of displayMode to restart on code change? Or only the webapp?
Perhaps a simple improvement would be to add a refresh button to the webapp. Not sure if you can hot-reload the page or if it needs to fully stop and start. I'm thinking of this feature because I found this package after having circular dependencies and skott really helped me debug and get rid of them, but I found myself changing one file, exiting in terminal, restarting skott, making a change, exiting, restarting, etc.
I haven't used the CLI enough to understand all the ways skott could run with commands so i'll leave that to others.
from skott.
Hello @austinm911,
I have been working on a universal watch mode lately, you can see the changes in the opened PR.
For the first version, watch mode will be available for all types of display modes (webapp, file-tree, graph and raw) and it will work transparently and automatically under the hood (no user action needed). For the webapp, I'm implementing Server-Sent Events to provide real time notifications and automatically update the graph rendering.
I will keep you updated :)
from skott.
Related Issues (20)
- Restore behavior where we can provide falsy values to boolean options with the CLI
- Allow "import { type X }" to be part of the "typeOnly" tracking process
- webapp display mode throws error in wsl HOT 9
- skott installation adds 544 MB to node_modules HOT 9
- Failed to Resolve with index.tsx files HOT 3
- Support imports map in package.json HOT 1
- Feature request: group modules in visualizaton using project structure HOT 28
- Resolving paths using path aliases HOT 10
- It's so useful, just to express my gratitude. HOT 1
- Feature request: call graph HOT 1
- Feature Request: Allow path grouping to visualize relationships between monorepo packages as a whole HOT 6
- Introduce diagnostics collection to monitor performance
- fs-tree-structure is using a lodash.set that has high severity vulnerability! HOT 2
- Issue installing `[email protected]` with pnpm HOT 2
- Can support for vue projects be added? HOT 1
- provde option to ignore barrel files HOT 7
- Ship a bundled and standalone version of skott's cli
- process.chdir does not affect working directory used by skott for creating node id paths HOT 18
- Resolving "import type" statements HOT 3
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 skott.