We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I try to use this from Rescript, I get
Error: package name is expected to be bs-node-readline but got bs-readline
I'm new to all this, but I believe it's because the mopdule name is bsconfig doesn't match the directory name (or the name in package.json)?
bsconfig
Major apologies if I just don't understand something obvious...
The text was updated successfully, but these errors were encountered:
I changed the name in bsconfig and it now works fine.
If you wanted to show your example as a Rescript version as well, it's a minor change:
let options = Readline.interfaceOptions( ~input=%raw(`process.stdin`), ~output=%raw(`process.stdout`), (), ); let readline = Readline.createInterface(options); let yes = %re("/yes|y/gi") let no = %re("/no|n/gi") readline -> Readline.question("Is ReasonML and BuckleScript awesome? ", answer => { switch (answer) { | a when Js.Re.test_(a, yes) => print_endline("You know it!") | a when Js.Re.test_(a, no) => print_endline("You need to revaluate your answer") | _a => print_endline(`I don't have a variant for your answer 😦`) }; Readline.close(readline); }); ~~~
Sorry, something went wrong.
No branches or pull requests
When I try to use this from Rescript, I get
I'm new to all this, but I believe it's because the mopdule name is
bsconfig
doesn't match the directory name (or the name in package.json)?Major apologies if I just don't understand something obvious...
The text was updated successfully, but these errors were encountered: