excubo-ag / WebCompiler

Apache License 2.0
148 stars 29 forks source link

Webcompiler does nothing when istalled as a local dotnet tool #56

Closed sergeyzwezdin closed 1 year ago

sergeyzwezdin commented 2 years ago

WebCompiler doesn't work once it is installed as a local dotnet tool.

Steps to reproduce:

  1. dotnet new tool-manifest
  2. dotnet tool install Excubo.WebCompiler --version 3.1.3-preview.1
  3. Create test SCSS file
  4. dotnet tool run webcompiler test.scss
  5. The commands runs successfully, there are no any error, but CSS file(s) doesn't appear.
2022-01-09 at 16 49 12@2x

Here is the repo with reproduction of the.

Environment

sergeyzwezdin commented 2 years ago

I understand that it is possible to use it as a global tool, but I'd consider it as a bad practice when you use it in a team project. So, is there any chance to make it work as a local tool?

sergeyzwezdin commented 2 years ago

Also, is there any chance that it will be implemented to use as a nuget package to integrate it into the project build step without the requirement to install dotnet tool? It seems a much more convenient way since it doesn't require to have additional required dotnet tool restore command run for every team member.

sergeyzwezdin commented 2 years ago

It fails on CompileFile() method run:

https://github.com/excubo-ag/WebCompiler/blob/4e5ed58ccffaf28a7a11c9c3b45b4eb15c43e63f/WebCompiler/Compile/SassCompiler.cs#L70-L73

Something wrong with DartSassHost and it is specific to using it as dotnet local tool.

sergeyzwezdin commented 2 years ago

Created the issue in DartSassHost repo - https://github.com/Taritsyn/DartSassHost/issues/4