From df3e08d931d1a80acf5e4eb78300236661575b63 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Wed, 6 Feb 2019 15:13:00 +0000 Subject: [PATCH] docs: update clear console advice [skip ci] --- faq.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/faq.md b/faq.md index 603a2e84..f8b205eb 100644 --- a/faq.md +++ b/faq.md @@ -13,11 +13,13 @@ In your `nodemon.json` (or in your `package.json`) you can include the follow ev ```json { "events": { - "start": "node -e 'console.clear()'" + "start": "cls || clear" } } ``` +Note that on Windows, this will clear the scroll buffer too. If you try to use node to clear the screen, you may have a race condition between the boot time of your process and the start event. This method should be the fastest. + # nodemon doesn't restart on .env change This is an edge case with how nodemon watches files. This is because nodemon doesn't know if `.env` is a hidden file with no extension or a `*.env` without a filename.