excubo-ag / WebCompiler

Apache License 2.0
148 stars 29 forks source link

Make a Build nupkg variant of this #66

Closed frankhommers closed 1 year ago

frankhommers commented 1 year ago

We do some packaging stuff with Libman too. They have a CLI version: https://www.nuget.org/packages/Microsoft.Web.LibraryManager.Cli But also one which you can just ref in your project during the Build stage: https://www.nuget.org/packages/Microsoft.Web.LibraryManager.Build

It would be very cool if we could have such a build thingy of this webcompiler too!

Anyway, great work! We love it ;-)

stefanloerwald commented 1 year ago

Hi @frankhommers,

Could you please elaborate what specifically you are looking for? There's already support for using this in build targets, as documented in the Readme, so I'm not sure what's missing for you.

Cheers, Stefan

frankhommers commented 1 year ago

Well, for Microsoft.Web.LibraryManager.Build we don't need to do dotnet tool restore just referencing the package will make it execute the build step.

stefanloerwald commented 1 year ago

I never had to run that command so far. AFAIK it's only relevant if you use dotnet tools locally, rather than globally. Have you considered switching?

frankhommers commented 1 year ago

For us it is inside a Docker container.

stefanloerwald commented 1 year ago

For docker files, I'd strongly recommend running the webcompiler commands as independent operations to the dotnet build. You will never get any caching benefits if compiling static assets is inside the dotnet build.