NativeScript / nativescript-dev-sass

SASS CSS pre-processor for NativeScript projects
Apache License 2.0
44 stars 17 forks source link

LiveSync issues with dev-sass #20

Closed NordlingDev closed 7 years ago

NordlingDev commented 7 years ago

Platform: iOS TNS: 2.5.1

When livesyncing, the prepare-before and prepare-after hooks make the livesync refresh the app twice (or sometimes more). This makes it rather difficult to work with since it refreshes the app too often between the syncs. Is this possible to fix or get rid off?

Liooo commented 7 years ago

same here, compile runs many times everytime I make a change

NordlingDev commented 7 years ago

@Liooo Yeah. In addition, after a couples saves, the livesync may have 5 processes running at the same time. Meaning, everything I do is multiplied by 5.

cookingfox commented 7 years ago

Same here, of course it's nice to have livesync refresh after changing .scss files, however this causes some looped operations where livesync first gets triggered by changing the .scss and a second time by the generated/updated .css file.

toddanglin commented 7 years ago

There are a number of LiveSync issues with the 2.5.x versions of the NativeScript CLI. The latest version of this plugin has been patched to work with the upcoming NativeScript 3.0.0, and remains backwards compatible (with LiveSync support) in versions 2.4.x (and earlier) of the {N} CLI.

I'd suggest either downgrading your CLI to 2.4.x or going ahead and upgrading to the 3.0.0 RC.

To use the latest version of this plugin for now, do this:

$ tns plugin remove nativescript-dev-sass
$ tns plugin add nativescript-dev-sass@rc --save-dev

Let me know if this works for you.

ManuelSch commented 6 years ago

I'm still experiencing this exact issue. Any suggestions how to solve it? Since css in nativescript is (at least to me) mostly try-and-error the double-reload problem makes styling real tiring...