Integrate TailwindCSS in one command.
Project description
FlaskTailwindCSS
Flask Tailwind CSS is a convenient library designed to automate the integration of Tailwind CSS into your Flask projects with just a simple command. This library simplifies the process of configuring and managing Tailwind CSS, allowing you to focus more on building your Flask application and less on setup hassles.
Installation
Install PageRouter using pip
:
pip install flask-tailwindcss
Usage
Before you proceed, make sure you are in the correct directory.
pwd
path/to/your/project
project/
│
├── env/
If this is the case, you can use the following command:
flask-tailwindcss
After executing the command, your project structure should resemble the following:
project/
├── env/
│
├── static/
│ ├── css/
│ │ ├── main.css
│ │
│ ├── src/
│ │ ├── input.css
│
├── templates/
├── app.py
├── package.json
└── tailwind.config.js
You can now add in your templates the tag to reference an external stylesheet. Here's an example:
<link rel="stylesheet" type="text/css" href="url_for('static', filename='css/main.css')">
And finally, run the npm server using:
npm tailwind
Contributing
Contributions are welcome! If you find a bug or have a feature request, please open an issue.
License
This project is licensed under the MIT License:
MIT License
Copyright (c) 2024 Etienne DTS
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for flask_tailwindcss-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b112bd7dc53e9293e9d75a29e6911631cf08cb5f7491786e41436068ea4d2d7e |
|
MD5 | 6be99ed5f207e783866d8c1eb10fa0fc |
|
BLAKE2b-256 | 169225f97530c01002b6adc4e7b1452535b74a51a3f9ef2c4eecf59e05ea8444 |