Skip to main content

Flask+Vite integration.

Project description

Flask-Vite

image

Plugin to simplify use of Vite from Flask.

  • Status: Alpha.
  • Free software: MIT license

Usage

Instantiate the Flask extension as you do for other Flask extensions:

from flask_vite import Vite

app = Flask(...)
vite = Vite(app)

# or
vite = Vite()
vite.init_app(app)

Then you can use the following commands:

$ flask vite
Usage: flask vite [OPTIONS] COMMAND [ARGS]...

Perform Vite operations.

Options:
--help  Show this message and exit.

Commands:
build          Build the Vite assets.
check-updates  Check outdated Vite dependencies.
init           Init the vite/ directory (if it doesn't exist)
install        Install the dependencies using npm.
start          Start watching source changes for dev.
update         Update Vite and its dependencies, if needed.

Features

  • Manages a vite directory where you put your front-end source code.
  • Auto-injects vite-generated assets into your HTML pages.

Credits

This project is inspired by the Django-Tailwind project.

This package was created with Cookiecutter, using the abilian/cookiecutter-abilian-python project template.

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_vite-0.2.0.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

flask_vite-0.2.0-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

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