terence55 / themes-switch

Toolset for switch multiple themes in application based on webpack
54 stars 18 forks source link

Imports are created incorrectly under windows #6

Closed The-Wood closed 2 years ago

The-Wood commented 4 years ago

I tried to integrate this neat plugin in my build as it seems to solve the exact problem i am facing right now.

The project I am working on is a VueJs application that uses Zurb Foundation, which in turn uses SASS as CSS preprocessor.

Though my build pipeline for production runs under Linux, I am developing with Windows locally.

I faced the problem, that the .scss files created under "/temp" contained unescaped backslashes:

In "/temp/themes/light.scss":


$black: #222427;
$white: #FFFFFF;

@import '../../src\styles\app.scss';

Within SASS-files the path would either have needed to be escaped or changed to use the POSIX format.

The expected output would have been:

$black: #222427;
$white: #FFFFFF;

@import '../../src/styles/app.scss';

I will provide a pull request, fixing this problem.

Franklevrai commented 4 years ago

Hello @terence55,

I really like your plugins too, but unfortunatly I am facing the same issue, I tested it with the code in PR from The-Wood and it solve my problem.

Would it be possible to merge PR into the master and create a new release soon?

I would really appreciate it

Thanks

raduneo1 commented 4 years ago

Hi @terence55,

I actually encountered the exact same problem. I really like your library as it allows us to implement theming in a very elegant way.

But I only managed to get it working with this fix... if you could merge this PR it would be VERY appreciated.

Thank you very much.

terence55 commented 3 years ago

Sorry for the late reply, because I made some changes before, the PR conflicts. I have merged this PR manually and released a new version. It may be too late, but hope this helps others.