Open stockholmux opened 6 years ago
Nodemon likely uses a readline style input (or buffers input) for optimisation. If this is a case, this is intended behaviour and is caused by nodemon, not blessed.
I had this problem as well, and it was a bit unclear on how to solve it when consulting the Nodemon documentation. Seems like it's not even in the docs.
But it's actually easy to solve, just pass the following flag to Nodemon when firing it up:
-I, --no-stdin
For over clarification:
nodemon -I your_blessed_program_now_working.js
Then all your $TERM (xterm etc) escape sequences will work as usual, and Nodemon will re-execute your program when you write any changes to the file.
I had this problem as well, and it was a bit unclear on how to solve it when consulting the Nodemon documentation. Seems like it's not even in the docs.
But it's actually easy to solve, just pass the following flag to Nodemon when firing it up:
-I, --no-stdin
For over clarification:
nodemon -I your_blessed_program_now_working.js
Then all your $TERM (xterm etc) escape sequences will work as usual, and Nodemon will re-execute your program when you write any changes to the file.
if add the -I
option, ctrl-c
won't response after the first restarting
If running a script that uses blessed executed by nodemon, the key presses will only register after hitting enter/return.
If you type 'asdf' then you won't see any of the key press logs, but if you press enter/return, you'll see the long for 'a', then 's', then 'd', then 'f' and finally return all at the same time.
Running the same script with plain 'node', the behaviour will be as expected.