Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dentonzh/flask-tailwind-no-node
Start a Python Flask project using Tailwind. No Node.js or npm required.
https://github.com/dentonzh/flask-tailwind-no-node
Last synced: about 1 month ago
JSON representation
Start a Python Flask project using Tailwind. No Node.js or npm required.
- Host: GitHub
- URL: https://github.com/dentonzh/flask-tailwind-no-node
- Owner: dentonzh
- Created: 2024-02-15T21:31:31.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-29T16:23:44.000Z (10 months ago)
- Last Synced: 2024-10-21T04:51:41.138Z (3 months ago)
- Language: HTML
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a no-frills [Flask](https://quart.palletsprojects.com/en/latest/index.html) project starter that allows you to use Tailwind without Node.
## Clone this repository
By using git via command line: `git clone https://github.com/dentonzh/flask-tailwind-no-node.git`
Or by [downloading the zip](https://github.com/dentonzh/flask-tailwind-no-node/archive/refs/heads/main.zip)## Download Tailwind's standalone CLI
Select the correct executable from [the list of exectuables (under "Assets")](https://github.com/tailwindlabs/tailwindcss/releases) based on your OS and architecture.
Rename this executable to `tailwindcss`.
If on Linux or Mac, run `chmod +x tailwindcss` to make `tailwindcss` executable.
## Set up virtualenv and install dependencies
Via command line: `python -m venv path/to/new/virtual/environment`
Followed by this command: `pip install -r requirements.txt`## Run your project in debug mode
Via command line: `flask run --debug`
Note that `app/__init__.py` contains code that runs the `tailwindcss` executable. When you make changes to any of the templates in `app/templates`, `tailwindcss` will automatically compile a new `output.css` file.
## Minify output.css for production
To minify your `output.css` for production, run this command:
`./tailwindcss -i app/static/css/input.css -o app/static/css/output.css --minify`