How to keep grunt server running even if there is a coffeescript compilation error?

For a while, I will have a typo in my coffee file, which the compiler breaks, which then shuts down the grunt server with a "do not compile" error message.

How to prevent the server from exiting and continue browsing until the next successful compilation?

+4
source share
2 answers

You can use the --force when running grunt to prevent it from exiting the task on error. For instance:

grunt coffee --force

+1
source

Usually I have node -supervisor that works in my output directory without any interaction with grunt scripts. My compiler My Coffee Script throws an error (gives me a warning), but it will not stop my server at all. Then you can fix the error, save and wait for the server to reboot.

If you have screen real estate to allow this, I would recommend this setting, since it will not potentially hide errors, but it will still allow you to check whether errors are related to the task you are working on.

0
source

Source: https://habr.com/ru/post/1488335/


All Articles