New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrating Enquirer with a browser UI? #17
Comments
I think what you'd want to do is not use Enquirer, but create a browser UI library that mocks the same API. |
I believe @doowb created an example for this with Enquirer 2.0. Maybe we can get him to share how that worked! :) |
@doowb any chance you have an example of doing this stashed away on your hard-drive somewhere? 😉 |
Lol... not exactly. I used this carlo example which runs the xterm emulator in the browser. We have made Enquirer a lot more customizable and decoupled action logic and updates to the state from the rendering and writing to the output stream, so it may be possible to override some methods to make it usable in a browser, but I think it would still require some work. |
Closing since I think this is something that we could add to the docs or a recipe. A PR is very welcome! |
https://observablehq.com/@kreijstal/xterm-js |
have a look at teleterminal too :-) https://github.com/amwmedia/teleterminal |
Hello - Is it possible to integrate Enquirer with a browser UI, such that question/prompt definitions and related behaviours are decoupled from the presentation (e.g., CLI, browser)? If so, can you please guide me to the relevant documentation? If not, would you consider adding this to the roadmap?
I am not looking for a terminal-like interface in a browser, rather I'm looking for the core of Enquirer (types of inquiries, validation, etc.) and pluggable outputting functions, so that my app can be used in a terminal environment and a web app environment with minimal code.
I asked a similar question to Inquirer.js, and here is the response: SBoudrias/Inquirer.js#543
The text was updated successfully, but these errors were encountered: