Skip to content
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

Display (w/ or w/o path) which file has changed and triggered restart #551

Closed
jagged3dge opened this issue May 16, 2015 · 6 comments
Closed
Labels
stale no activity for 2 weeks

Comments

@jagged3dge
Copy link

Would it be possible to have nodemon display which file has been changed to trigger a restart? I'm sure this would be most helpful especially when the output is piped to and consumed by another process.

I'm not sure if this feature exists already.
If it is, someone please kindly tell me how to get it working with the latest nodemon npm package.
If it isn't already implemented, is there any interest for this feature?

My request spawns from watching grunt serve output that shows file changes like below:

>> File "app\scripts\controllers\registration.js" changed.

Nodemon could provide something like this:

16 May 06:31:29 - [nodemon] "app\scripts\controllers\registration.js" changed.
16 May 06:31:29 - [nodemon] restarting due to changes...

It'd be great to have something like this from nodemon as well.

@remy
Copy link
Owner

remy commented May 16, 2015

See docs around events. It's supported.
On 16 May 2015 02:12, "jagged3dge" notifications@github.com wrote:

Feature request: Would it be possible to have nodemon display which file
has been changed to trigger a restart? I'm sure this would be most helpful
especially when the output is piped to and consumed by another process.

Any interest for this feature?

My request spawns from watching grunt serve output that shows file
changes like below:

File "app\scripts\controllers\registration.js" changed.

It'd be great to have something like this from nodemon as well.


Reply to this email directly or view it on GitHub
#551.

@stale
Copy link

stale bot commented Dec 5, 2017

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Dec 5, 2017
@stale stale bot closed this as completed Dec 12, 2017
@qiulang
Copy link

qiulang commented Nov 18, 2018

I read https://github.com/remy/nodemon/blob/master/doc/events.md but still can't where did the document record that. But it is easy to do that by--verbose switch

@xinbenlv
Copy link

I read https://github.com/remy/nodemon/blob/master/doc/events.md but still can't where did the document record that. But it is easy to do that by--verbose switch

same here.... I think it would be super helpful if @remy could make this feature more explicitly documented. An use case here is https://cmty.app/nuxt/nuxt.js/issues/c10464

@AlanSl
Copy link

AlanSl commented Mar 10, 2022

nodemon --verbose isn't quite as good as a "show which file change caused the command to run" flag if you have a lot of
--ignore filters in place.

I've got a nodemon command that runs a build script with an --ignore on the build target directory and the --verbose output fills up with hundreds of lines like:

[nodemon] files triggering change check: build/some/ignored/file.js
[nodemon] changes after filters (before/after): 1/0
[nodemon] files triggering change check: build/another/ignored/file.js
[nodemon] changes after filters (before/after): 1/0
[nodemon] files triggering change check: build/yet/more/ignored/files.js
[nodemon] changes after filters (before/after): 1/0

...and there's sometimes so much output that the one crucial line about the one crucial change that wasn't filtered gets overwritten by the runner's output (ultra's spinners).

It'd be great if there was an option to only output changes that passed the filters.

@rattrayalex
Copy link

@remy can you share a link to the docs for this? Or should the issue be reopened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity for 2 weeks
Projects
None yet
Development

No branches or pull requests

6 participants