Closed PeterStaev closed 7 years ago
Thanks for the impressive contrib, Peter!
I didn't notice this PR before doing some refactoring for the upcoming 3.0 release, BUT I think your fixes will solve other issues people are having with 2.5.x. Let me try to resolve the conflicts and merge this weekend. Should make the plugin robust and ready for all versions of {N} CLI.
Worked on merging your contributions over the weekend. GREAT refactoring. Thanks again for taking the time to make it.
Through my testing, with these changes, SASS LiveSync works as expected in {N} 2.5.x and 3.0.0-rc.
In {N} 2.4.x, however, LiveSync changes to SASS files trigger a relaunch of the app (versus doing a faster, in-place update of the styles).
SO...this new approach improves the LiveSync experience for 2.5.x and higher, but (seems to) degrade slightly for 2.4 and lower. I'm wondering if that's okay and we should just guide people to use the current version of the plugin if they're on {N} 2.4 or earlier. What do you think?
Glad it works with 3.0-rc as well!
As for older version - I think it should be fine as long as we have some note in the readme that if you are using version pre-2.5 you should specifically install version ~0.4. And if you are using version 2.5+ to use the new version.
Changes integrated via #25
First of all thanks for this plugin! Have been using it in a new project, and noticed some slow-up/problems with the new
tns run
that does automatic watch. This patch addresses the following:@import
files to be at the app root. Instead it should be able to use relative paths. So if I haveapp/view/login.scss
and I want to@import
a file from theapp
folder i should be using../../
in the path.The code rewrite was greatly inspired by the
nativescript-dev-typescript
plugin 😄