Download the PHP package responsive-sk/vite without Composer
On this page you can find all versions of the php package responsive-sk/vite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package vite
ResponsiveSk Vite Integration
A simple and lightweight integration of Vite with Slim 4 framework.
Installation
Usage
Register the service in your container
Use in Twig templates
Configuration
The ViteService constructor accepts the following parameters:
PathsInterface $paths: The paths service from slim4/rootstring $buildDirectory = 'build': The build directory relative to public pathbool $isDev = false: Whether to use dev serverstring $devServerUrl = 'http://localhost:5173': Dev server URLarray $assetDirectories = ['images' => 'assets/images', 'fonts' => 'assets/fonts']: Directories where assets are stored
Available Methods
ViteService
asset(string $entry): string- Get the path to an assetentryLinkTags(string $entry): string- Generate link tags for CSS files from an entryentryScriptTags(string $entry): string- Generate script tags for JS files from an entryimage(string $path, string $resourcePath = 'resources/images', ?string $placeholder = null): ?string- Get the path to an image, returns null if image not found and no placeholder specifiedfont(string $path): string- Get the path to a fontgetManifest(): array- Get the raw manifest data
TwigExtension
vite_asset(string $entry): string- Get the path to an assetvite_entry_link_tags(string $entry): string- Generate link tags for CSS files from an entryvite_entry_script_tags(string $entry): string- Generate script tags for JS files from an entryvite_image(string $path, string $resourcePath = 'resources/images', ?string $placeholder = null): ?string- Get the path to an image, returns null if image not found and no placeholder specifiedvite_font(string $path): string- Get the path to a fontvite_css(string $entry): string- Alias for vite_entry_link_tags (legacy)vite_js(string $entry): string- Alias for vite_entry_script_tags (legacy)
License
MIT
All versions of vite with dependencies
PHP Build Version
Package Version
The package responsive-sk/vite contains the following files
Loading the files please wait ...