Skip to content

File watching should be debounced #2890

Closed

Description

@b12f

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.

Activity

  1. rosen-vladimirov commented on Jun 26, 2017

    @rosen-vladimirov
    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.

  2. b12f commented on Jun 26, 2017

    @b12f
    Author

    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.

  3. rosen-vladimirov commented on Jun 26, 2017

    @rosen-vladimirov
    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.

  4. b12f commented on Jun 26, 2017

    @b12f
    Author

    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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions