Commands¶
Vite commands module.
This module provides utility functions for Vite project initialization. The main scaffolding functionality has moved to litestar_vite.scaffolding.
- litestar_vite.commands.init_vite(app: Litestar, root_path: Path, resource_path: Path, asset_url: str, public_path: Path, bundle_path: Path, enable_ssr: bool, vite_port: int, hot_file: Path, litestar_port: int, framework: str = 'react') None[source]¶
Initialize a new Vite project using the scaffolding system.
- Parameters:
app¶ – The Litestar application instance.
root_path¶ – Root directory for the Vite project.
resource_path¶ – Directory containing source files.
asset_url¶ – Base URL for serving assets.
public_path¶ – Directory for static files.
bundle_path¶ – Output directory for built files.
enable_ssr¶ – Enable server-side rendering.
vite_port¶ – Port for Vite dev server.
hot_file¶ – Path to hot reload manifest.
litestar_port¶ – Port for Litestar server.
framework¶ – Framework template to use (default: react).
- Raises:
MissingDependencyError – If Jinja2 is not installed.