-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Tailwindcss #982
Comments
it's no different to using tailwind with any other project, although I tend to use the standalone tailwind cli as it means I don't have a dev dependency on node/bun: https://tailwindcss.com/blog/standalone-cli there is also a version that includes daisyui that tracks the main tw cli: https://github.com/dobicinaitis/tailwind-cli-extra If you need extra tailwind 'plugins' then it would be better to go down the normal tailwind route (i.e. use node/bun with tailwind). Once I have the tools in place I simply use a taskfile (https://taskfile.dev), but any make type tool will also do the job of synchronising the tools, below I've listed my taskfile for reference: # https://taskfile.dev
version: '3'
tasks:
tidy: go mod tidy
build:
desc: Build the binary
deps:
- tidy
cmds:
- go build -o ./tmp/main .
run:
desc: Run the binary
deps:
- build
cmds:
- ./tmp/main
air:
desc: Run the air server
cmds:
- air
templ:
desc: Generate the templates
cmds:
- templ generate -watch
tw:
desc: Run the TailwindCSS watcher
cmds:
- tw -i ./web/src/css/tailwind.css -o ./web/public/css/main.css --watch
dev:
deps: [tw,templ,air] I also use air to reload/rebuild the app on change. To run the dev environment, I simply |
I use |
I'm no Make expert but other people use make successfully, something along the lines of: make -j 2 templ watch Which as far as I understand it should run 2 jobs in parallel. the templ job will watch templ files and recompile to go files, the watch task will watch go files and the jobs will cascade into each other. The command above is similar to my entry in the task file for dev:
deps: [tw,templ,air] which runs the 3 jobs in parallel. |
How can I make this work with tailwindcss?
The text was updated successfully, but these errors were encountered: