WebCompiler icon indicating copy to clipboard operation
WebCompiler copied to clipboard

Webcompiler does nothing when istalled as a local dotnet tool

Open sergeyzwezdin opened this issue 3 years ago • 4 comments

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

  • Apple Silicone (M1 Max)
  • macOS 12.1
  • dotnet 6.0.101

sergeyzwezdin avatar Jan 09 '22 11:01 sergeyzwezdin

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 avatar Jan 09 '22 11:01 sergeyzwezdin

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 avatar Jan 09 '22 11:01 sergeyzwezdin

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 avatar Jan 09 '22 16:01 sergeyzwezdin

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

sergeyzwezdin avatar Jan 09 '22 18:01 sergeyzwezdin