rozumak / tailwindcss-dotnet

A dotnet tool for installing and invoking Tailwind CSS.
MIT License
29 stars 2 forks source link

[Question] How to configure `--input`, `--output` and `--config` paths in the `*.csproj` file #1

Open joaquinrovira opened 9 months ago

joaquinrovira commented 9 months ago

First of all thank you for the amazing tool!

Running dotnet tailwind watch executes the following command:

<TAILWIND_EXE> -i <PROJECT_PATH>/styles/app.tailwind.css -o <PROJECT_PATH>/wwwroot/css/app.css -c /hom<PROJECT_PATH>/tailwind.config.js --minify -w

I would like to configure different values for those paths (/styles/app.tailwind.css, /wwwroot/css/app.css , /tailwind.config.js) but see no option or way to configure it in the documentation. Am I missing something or is it not possible at the moment?

I have worked around it by running dotnet tailwind exec -w -i <INPUT> -c <CONFIG> -o <OUTPUT> but it would be best if these values could be configured at a project level so running dotnet tailwind watch just works

rozumak commented 1 month ago

Thank you for using it.

Yes tailwind paths are pre-configured with default settings that cannot be changed. The only way to customize them right now is by running the Tailwind CLI command directly with dotnet tailwind exec -w -i <INPUT> -c <CONFIG> -o <OUTPUT>.

As a workaround, you can create a bash/batch script with this command and run it easily with .\watch (Windows) or ./watch (Unix-like systems).

Currently, there are no plans to read these values from the *.csproj file, but PRs are welcome.