Skip to main content

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/

    • app.py

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 run 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

flask-tailwindcss-0.5.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flask_tailwindcss-0.5-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file flask-tailwindcss-0.5.tar.gz.

File metadata

  • Download URL: flask-tailwindcss-0.5.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.1

File hashes

Hashes for flask-tailwindcss-0.5.tar.gz
Algorithm Hash digest
SHA256 f4e9807e22a1a67a2c6714651ce0e4d7ca26fdb0d9d14460f98c24ded2f5e228
MD5 887e781ad09cb80ee4f383f13a05e2da
BLAKE2b-256 7150ad799a66576f747cae696536800c4418aff2504608b76657a240f72f858e

See more details on using hashes here.

File details

Details for the file flask_tailwindcss-0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for flask_tailwindcss-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bedccbe04531b0daa70298a44f9437fd9d74304a024ac78819a8145bdcf8d665
MD5 dce591e7d55671743f858633cea951c1
BLAKE2b-256 18ae791a959e8b55281aa1165204a4ff270d17625880b187bfd14bf07a929716

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page