Skip to content
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

Watch for file changes to support hotreload #16

Open
MJRasicci opened this issue Mar 24, 2023 · 3 comments
Open

Watch for file changes to support hotreload #16

MJRasicci opened this issue Mar 24, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@MJRasicci
Copy link
Owner

The Tailwind CLI supports a flag --watch which will rebuild tailwind any time one of the configured source files changes, We should run the CLI in watch mode to support hotreload scenarios. This will require managing the lifetime of the tailwind cli process more closely.

@MJRasicci MJRasicci added the enhancement New feature or request label Mar 24, 2023
@MJRasicci MJRasicci self-assigned this Mar 24, 2023
@MattParkerDev
Copy link

Any updates on this issue? :)

@andersme
Copy link

andersme commented Jan 9, 2024

This would be a really helpful feature. What's left to do to make this work?

@kallebysantos
Copy link

I had create an similar pack toolset for tailwindcss: Tailwind Hosting
This contains 2 main packages, one for Hosting Startup and other for MsBuild.
Check the examples/Blazor for how can use it.

But is simple, just dotnet add Tailwind.Hosting and dotnet add Tailwind.Hosting.Build
Then add the following to your Properties/launchSettings.json

"environmentVariables": {
    "ASPNETCORE_ENVIRONMENT": "Development",
    "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Tailwind.Hosting"
}

My Tailwind.Hosting.Build implementation has less features and customizations than Tailwind.MSBuild package but works for integrate tailwindcss with .Net.

The available variables are:

Property Value
TailwindVersion latest or custom value like 3.3.5
TailwindWatch true
TailwindInputCssFile {Project Folder}/wwwroot/styles.css
TailwindOutputCssFile {Project Folder}/wwwroot/app.css
TailwindConfigFile {Project Folder}/tailwind.config.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants