Skip to content

File watching should be debounced #2890

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

Closed
b12f opened this issue Jun 14, 2017 · 4 comments
Closed

File watching should be debounced #2890

b12f opened this issue Jun 14, 2017 · 4 comments
Assignees

Comments

@b12f
Copy link

b12f commented Jun 14, 2017

First of all thanks for working on this great project.

Tell us about the problem

I just deleted the "item" directory of the angular starter template while running tns run android and the application refreshed 12 times in a row, presumable once for every file/folder deleted.

Which platform(s) does your issue occur on?

It's a CLI problem, I encountered it on ubuntu 14.04

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.0.3
  • Cross-platform modules: 3.0.1
  • Runtime(s): android: 3.0.1
  • Plugin(s): none

Please tell us how to recreate the issue in as much detail as possible.

tns create testApp --ng
cd testApp
tns run android

Now delete app/items and watch the app get rebuild for the next minute or two.

@rosen-vladimirov
Copy link
Contributor

Hey @b12f ,
We've worked a lot to improve this scenario with the 3.1.x version, so can you try using the rc version of CLI and see if it resolves your issue? In order to install it, just use npm install -g nativescript@rc.

I'm looking forward to hearing from you.

@b12f
Copy link
Author

b12f commented Jun 26, 2017

Just tried it out, @rosen-vladimirov ,

File watching indeed appears to be debounced, which makes development a whole lot easier. Deleting files however does not currently trigger a rebuild at all for me, only editing files. That's cool, but I'm not sure if that is the intended behaviour.

@rosen-vladimirov
Copy link
Contributor

Hey @b12f ,
In case you delete .js files, application should be restarted, but not rebuilt. However, in case you delete something in App_Resources of your application, a rebuild is required. What did you delete? In case it were only .js (.ts) files, it is expected just to restart the app.

@b12f
Copy link
Author

b12f commented Jun 26, 2017

I deleted app/items/ as a whole again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants