Skip to content

CLI tool doesn't restart app if HTML/CSS file was modified #2780

@otaran

Description

@otaran

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

Yes, this works in version 2.5.x and is broken in 3.0.0.

Tell us about the problem

tns run ... will not restart the app if any HTML or CSS file was modified. It does restart the app if TS or JS file was modified. The output of tns run ios look like this:

Executing before-prepare hook from /Users/otaran/Developer/sandbox/test-html-css-sync/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Project successfully prepared (ios)
Transferring project files...
Successfully transferred item-detail.component.html.
Refreshing application...
Successfully synced application org.nativescript.testhtmlcsssync on device C6C627C7-F2F6-4FBC-9C52-1998C10EE2A6.

NativeScript debugger attached.

Which platform(s) does your issue occur on?

  • Android
  • iOS

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

$ tns --version
3.0.0
$ grep version node_modules/tns-core-modules/package.json
  "version": "3.0.0"
$ grep -A 5 tns-android package.json 
    "tns-android": {
      "version": "3.0.0"
    },
    "tns-ios": {
      "version": "3.0.0"
    }
$ grep nativescript- package.json 
    "nativescript-angular": "~3.0.0",
    "nativescript-theme-core": "~1.0.2",
    "nativescript-dev-typescript": "~0.4.0",

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

  1. Unpack and run
    test-html-css-sync.zip with tns run ios
  2. Drill down to any row
  3. Modify items.component.html or items.component.css
  4. Watch how it syncs the file but does not restart the app (i.e. the app stays on the same page and changes are not applied)

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

No.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions