PHPackages                             jakercz/webloader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. jakercz/webloader

ActiveLibrary

jakercz/webloader
=================

Simple, easy to use, php bundler for javascript and css

v1.3.2(5y ago)013BSD-3-ClausePHPPHP &gt;=7.2

Since Oct 24Pushed 5y agoCompare

[ Source](https://github.com/jAKErCZ/webloader)[ Packagist](https://packagist.org/packages/jakercz/webloader)[ RSS](/packages/jakercz-webloader/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (8)Versions (13)Used By (0)

 [![](https://github.com/Machy8/webloader/raw/master/logo.png)](https://github.com/Machy8/webloader/blob/master/logo.png)
 [ ![](https://camo.githubusercontent.com/94878061aad9b27d623e260c20826d30bdcaf176d64c5e2722158ad8202056d5/68747470733a2f2f7472617669732d63692e6f72672f4d61636879382f7765626c6f616465722e7376673f6272616e63683d6d6173746572) ](https://travis-ci.org/Machy8/webloader) [ ![](https://camo.githubusercontent.com/b91050609103c3f88f6761ffa89fd20d1a909e35ae8b1712e9589a24a6703781/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4d61636879382f7765626c6f616465722f62616467652e7376673f6272616e63683d6d6173746572) ](https://coveralls.io/github/Machy8/webloader?branch=master) [ ![](https://camo.githubusercontent.com/c3c2b118b5015d3dbbde03620f829b0086caabee35e9b95958bb2665ae73f2aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d61636879382f7765626c6f616465722e737667) ](https://github.com/Machy8/webloader) [ ![](https://camo.githubusercontent.com/38ab437fe9f1fd3dabe39703c82c1b08c5335a39ef4c9cdbc6f66a034bf0f6dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61636879382f7765626c6f616465722e7376673f7374796c653d666c6174) ](https://packagist.org/packages/machy8/webloader)
=======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#----------------------)

📦 Simple, easy to use, php bundler for javascript and css.

In a nutshell
-------------

[](#in-a-nutshell)

- **Configurable**: in one file (example bellow or in docs)
- Files **[collections](https://github.com/Machy8/webloader/blob/master/docs/Files%20collections.md)** and **[containers](https://github.com/Machy8/webloader/blob/master/docs/Files%20collections%20containers.md)**: makes assets organizing incredibly simple
- **[Filters](https://github.com/Machy8/webloader/blob/master/docs/Filters.md)**: callable in two different ways
- **[Path placeholders](https://github.com/Machy8/webloader/blob/master/docs/Placeholders.md)**: 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](https://github.com/Machy8/webloader/blob/master/docs/Tracy%20bridge.md)** for [Tracy](https://tracy.nette.org/cs/)

Requirements
------------

[](#requirements)

- PHP 7.2+
- If you use Nette Framework - v2.4+

Installation
------------

[](#installation)

```
 composer require machy8/webloader

```

Docs
----

[](#docs)

- [Files collections](https://github.com/Machy8/webloader/blob/master/docs/Files%20collections.md)
- [Files collections containers](https://github.com/Machy8/webloader/blob/master/docs/Files%20collections%20containers.md)
- [Filters](https://github.com/Machy8/webloader/blob/master/docs/Filters.md)
- [Placeholders](https://github.com/Machy8/webloader/blob/master/docs/Placeholders.md)
- [Tracy bridge](https://github.com/Machy8/webloader/blob/master/docs/Tracy%20bridge.md)

Quick start
-----------

[](#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.

```
my-bundle:
    cssFiles:
        - path/to/style-a.css
        - path/to/style-b.css
```

Next step is to init Web Loader, set the output dir path and tell him to create bundles from **bundle.neon**.

```
$webloader = new \WebLoader\Engine('path/to/webtemp');
$webloader->createFilesCollectionsFromConfig('path/to/bundle.neon');
```

The last step is to call files collections render to render css files collection named my-bundle.

```
echo $webloader->getFilesCollectionRender()->css('my-bundle');
```

The PHP file after the last edit will looks like this:

```
$webloader = new \WebLoader\Engine('path/to/output/dir');
$webloader->createFilesCollectionsFromConfig('path/to/bundle.neon');

echo $webloader->getFilesCollectionRender()->css('my-bundle');
```

The output will be similiar to the following code:

```

```

Quick start (for Nette Framework)
---------------------------------

[](#quick-start-for-nette-framework)

For the Nette Framework it is very similar. First of all, register Web Loader extension.

```
extensions:
    webloader: WebLoader\Bridges\Nette\WebLoaderExtension
```

Next step is to add Web Loader section with my-bundle collection configuration inside.

```
webloader:
    filesCollections:
        my-bundle:
            cssFiles:
                - path/to/style-a.css
                - path/to/style-b.css
```

In your presenter, inject the engine...

```
/**
 * @var Engine
 */
private $webLoader;

public function __construct(\WebLoader\Engine $engine)
{
    $this->webLoader = $engine;
}
```

and set template parameters (for example in the **beforeRender** method).

```
public function beforeRender()
{
    $this->template->setParameters([
        'webloaderFilesCollectionRender' => $this->webLoader->getFilesCollectionRender()
    ]);
}
```

The last step is to call the render in a latte template.

```
{$webloaderFilesCollectionRender->css('my-bundle')|noescape}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 97.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~112 days

Recently: every ~175 days

Total

12

Last Release

1896d ago

PHP version history (3 changes)v1.0.0PHP &gt;=7.0

v1.2.0PHP &gt;=7.1

v1.3.2PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d9dcc51e4630a86636fc7c465fa600135a678df7d52cb050b108734c7559ceb5?d=identicon)[jAk3r](/maintainers/jAk3r)

---

Top Contributors

[![Machy8](https://avatars.githubusercontent.com/u/14016808?v=4)](https://github.com/Machy8 "Machy8 (241 commits)")[![TomasPilar](https://avatars.githubusercontent.com/u/8326937?v=4)](https://github.com/TomasPilar "TomasPilar (4 commits)")[![RiKap](https://avatars.githubusercontent.com/u/6736715?v=4)](https://github.com/RiKap "RiKap (3 commits)")

---

Tags

javascriptcssfrontendbuild-toolwebloadermodule-bundler

###  Code Quality

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jakercz-webloader/health.svg)

```
[![Health](https://phpackages.com/badges/jakercz-webloader/health.svg)](https://phpackages.com/packages/jakercz-webloader)
```

###  Alternatives

[machy8/webloader

Simple, easy to use, php bundler for javascript and css

1934.2k3](/packages/machy8-webloader)[matthiasmullie/minify

CSS &amp; JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.

2.0k30.5M336](/packages/matthiasmullie-minify)[mexitek/phpcolors

A series of methods that let you manipulate colors. Just incase you ever need different shades of one color on the fly.

5003.6M18](/packages/mexitek-phpcolors)[janmarek/webloader

Tool for loading or deploying CSS and JS files into web pages

115514.4k14](/packages/janmarek-webloader)[tatter/frontend

Opinionated suite of frontend tech for CodeIgniter 4

125.3k](/packages/tatter-frontend)[dkcwd/dkcwd-zf2-munee

Zend Framework 2 module leveraging 'munee' an asset optimisation library developed by Cody Lundquist. You can find munee at http://github.com/meenie/munee

102.1k](/packages/dkcwd-dkcwd-zf2-munee)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
