-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request to update sass compiler to use dart sass instead of NodeScass/Ruby Scass #837
Comments
Koala supports using other compiler instead of the default one with the Advanced Setting for Sass compiler. Try these steps:
!!! The BAT script here has error with space in scss file path. Please instead use the fixed one below.
Then enjoy conveniences from Koala. Remark: Dart Sass supports only 2 options, source mapping [yes/no] and output style [expanded/compressed]. So we got only these 2 options usable in Koala. There is a discussion about this issue at twbs/bootstrap#34693 (comment). You might follow the topic. There might be other better solution in the future. |
@zybersup Just tried your suggestion for Dart with Koala... whenever I try to compile it errors on every file. For example :
Any ideas? Does it not like the spaces in the file location or something? That is the only place I can think of that the word 'Web' is referenced. |
Would appear either Koala or Dart doesn't like spaces in the file locations. I copied my folder to another location which doesn't have spaces in the location to the folder and it worked perfectly fine. Question is which one has the issue with that - Koala or Dart? |
I forgot to remark that we must not add any parameter after the file name. Only executable file location is allowed. (As far as I tried and saw the code and error message.)
As far as I see the Koala script (referred here below), any space in the file locations will be enclosed with double quote before use. So it should not cause a problem. koala/src/app/scripts/compilers/SassCompiler.js Lines 65 to 70 in bbd142d
Anyway, your workaround can solve the problem. So it might be the case really. |
I tried searching the message and found that it came from Windows command line execution. So the problem is surely not with Dart. May be with Koala or child_process.exec() in Node.js which Koala called to execute the compiler. This link might help. https://helpdeskgeek.com/how-to/fix-not-recognized-as-an-internal-or-external-command/ |
I changed my file path from I never had that problem with Koala until I configured it to use Dart as per the guide you posted. |
@zybersup I followed exactly what was shown in your post. Koala's executable path is set to
perhaps I misunderstood the sass.bat part of your guide? I inserted the lines above the exec line that was currently there. |
You did it correctly as I said above. Previously I thought you mean the compiler path, which I checked it already that can get space in it. Now I got it right. The problem is about having spaces in the path to SCSS file. Finally after hours of debugging the BAT script, which I am not an expert about, I found the cause and the way to fix it. Please use the code below instead of the previous one. Put it right before the execution line.
I hope this time it will work as you expect. |
Seems to be working with this method. Really appreciate it. Thank you! |
Glad to know that. :) However, there is a limitation using this script:
|
I followed your suggest and it works however in this way command line flag options like --style=expanded and --no--source-map doesn't work anymore. Is it possible modify the .bat to have working either dart sass in koala and dart sass from command line? |
Those 2 options [--style=expanded and --no--source-map] should still work. But the others do not and it because of incompatible options between the old bundled compiler and the dart one. Even for the compatible options, it is very difficult to make the .bat script to detect parameters sent out from Koala and modify them into new ones if you are not an expert on .bat script. Surely I am not. |
Those two options don't work anymore from command-line. Like workaround I copied the dart-sass folder and renaming it in dart-sass-koala, restored the original sass.bat in default dart-sass for command line dart-sass compile. I modified the sass.bat in dart-sass-koala like pointed out here and after I linked koala with this new sass.bat file. In this way It work either with Koala and with command line |
Koala 2.3.0
feature request?
Could you please update sass compiler to use dart sass instead of NodeScass/Ruby Scass?
The text was updated successfully, but these errors were encountered: