Code Monkey home page Code Monkey logo

Comments (5)

antoine-coulon avatar antoine-coulon commented on June 19, 2024 1

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

antoine-coulon avatar antoine-coulon commented on June 19, 2024 1

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.

antoine-coulon avatar antoine-coulon commented on June 19, 2024

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.

austinm911 avatar austinm911 commented on June 19, 2024

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.

antoine-coulon avatar antoine-coulon commented on June 19, 2024

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)

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.