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

Including tailwind start in runserver command? #198

Open
Spaxterr opened this issue May 16, 2024 · 2 comments
Open

Including tailwind start in runserver command? #198

Spaxterr opened this issue May 16, 2024 · 2 comments

Comments

@Spaxterr
Copy link

Hello, we are currently looking into implementing tailwind to our Django project. Initially, django-tailwind seems like a good option. However, I noticed that it requires you to run the watcher alongside the Django server. It would be highly beneficial for us if the python3 manage.py tailwind start command could be baked into the python3 manage.py runserver command.

This is because we want to introduce tailwind as seamlessly as possible. The current approach would require us to teach every developer on our team to always start the tailwind watcher as well.

@oliverhaas
Copy link

What's wrong with writing your own runserver command? If you want to make it super convenient, you should even be able to override the original one.

@willismonroe
Copy link

I tried creating a dev.sh script to run both, but the first command auto-exits soon after the script file is run. Is there a way to get both commands to start in a bash script?

dev.sh (NB: this doesn't work, only runserver stays running):

#!/usr/bin/env bash
# Exit on error
set -o errexit

python3 manage.py tailwind start &
python3 manage.py runserver

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

No branches or pull requests

3 participants