Download the PHP package jakercz/webloader without Composer
On this page you can find all versions of the php package jakercz/webloader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jakercz/webloader
More information about jakercz/webloader
Files in jakercz/webloader
Package webloader
Short Description Simple, easy to use, php bundler for javascript and css
License BSD-3-Clause
Informations about the package webloader
📦 Simple, easy to use, php bundler for javascript and css.
In a nutshell
- Configurable: in one file (example bellow or in docs)
- Files collections and containers: makes assets organizing incredibly simple
- Filters: callable in two different ways
- Path placeholders: reusable paths to files, less writing
- Allows you to load remote and local files
- If you have some critical css, you can load it directly into the page with minimal configuration required
- Prepared for read only deployment - webloader is able to compile all files collections at once
- Debugger bar for Tracy
Requirements
- PHP 7.2+
- If you use Nette Framework - v2.4+
Installation
Docs
Quick start
Let's say we have two css files (styla-a.css and style-b.css) and we want to bundle them into one file which name will be my-bundle. This bundle will be stored in a webtemp dir (must be accessible from a browser).
The recommended way to configure Web Loader is through neon configuration files. The first step is to create a bundle.neon. `
Next step is to init Web Loader, set the output dir path and tell him to create bundles from bundle.neon. ``
The last step is to call files collections render to render css files collection named my-bundle. ``
The PHP file after the last edit will looks like this: ``
The output will be similiar to the following code: `
Quick start (for Nette Framework)
For the Nette Framework it is very similar. First of all, register Web Loader extension.
`
Next step is to add Web Loader section with my-bundle collection configuration inside. `
In your presenter, inject the engine... ``
and set template parameters (for example in the beforeRender method). ``
The last step is to call the render in a latte template. `