Metadata-Version: 2.4
Name: fhvite
Version: 0.0.1
Summary: Vite plugin for FastHTML/MonsterUI that automates installation & building
Home-page: https://github.com/AnswerDotAI/fhvite
Author: Curtis Allan
Author-email: ca@answer.ai
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastcore
Requires-Dist: python-fasthtml
Requires-Dist: pybun
Provides-Extra: dev
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# fhvite


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Usage

### Installation

Install the latest version from
[GitHub](https://github.com/AnswerDotAI/fhvite):

``` bash
uv pip install git+https://github.com/AnswerDotAI/fhvite.git
```

This project requires [bun](https://bun.sh) to function properly. It
will be automatically installed on first run if not already installed in
the path

## How to use

Import into an existing FastHTML application and add the following:

``` python
from fasthtml.common import *

# Add this import
from fhvite.core import add_vite

app = FastHTML()

# Add this line
add_vite(app)
```


    > fastvite@0.0.0 build
    > vite build

    vite v7.0.4 building for production...
    transforming...
    ✓ 3 modules transformed.
    rendering chunks...
    computing gzip size...
    ../dist/.vite/manifest.json          0.19 kB │ gzip:  0.14 kB
    ../dist/assets/index-DwAzhI66.css  215.53 kB │ gzip: 25.35 kB
    ../dist/assets/index-DSGW5Iaw.js     0.71 kB │ gzip:  0.40 kB
    ✓ built in 103ms

All necessary setup files will be generated if not already present.
After that, subsequent server starts will simply build the assets and
inject them into the app header.

The plugin function also mounts a starlette `StaticFiles` route
automatically, making the generated assets benefit from proper cacheing
and static serving rules.
