Code Monkey home page Code Monkey logo

Comments (3)

danielstjules avatar danielstjules commented on July 26, 2024

Thanks for the issue! I could def expose lib/inspector.js, though it's probably not as helpful without a reporter. In the meantime, it could be accessed with require('jsinspect/lib/inspector') The same goes with the reporters themselves. Someone made a grunt plugin for a similar project, buddy.js, which follows that rough idea https://github.com/eugene-bulkin/grunt-buddyjs/blob/master/tasks/buddyjs.js

As for making it async, it's a CLI tool, and one with the equivalent of tight loops. Introducing async iteration would have a huge impact on performance. And it couldn't really be made async, since there's critical operations that are fully blocking, such as acorn's AST parsing, and the diff generation. I used promises a bit with buddy.js too, and I'll likely switch away from it, as it offers no benefit. Since it's a command line task, and not a server, I don't need to yield execution to any other resources running in that instance of node.

In regards to the results, they can be collected pretty easily by registering a listener to the "match" event. By rendering them progressively, a task would look far more responsive for a large project, rather than batching them all at the end.

I realize this is all just one point of view, but hopefully my reasoning isn't too poor!

from jsinspect.

danielstjules avatar danielstjules commented on July 26, 2024

Hope you don't mind if I close this, and let me know if you have any other comments or suggestions! :)

from jsinspect.

leny avatar leny commented on July 26, 2024

Thanks for your clarifying answer, I don't have anything to ask about this with these explications. πŸ‘

++

from jsinspect.

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.