PHPackages                             tedmoyses/glomr-lib - 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. tedmoyses/glomr-lib

ActiveLibrary

tedmoyses/glomr-lib
===================

The library implemenation of Glomr the static stite builder

1.0.18(7y ago)0331MITPHP

Since Jun 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/tedmoyses/glomr-lib)[ Packagist](https://packagist.org/packages/tedmoyses/glomr-lib)[ RSS](/packages/tedmoyses-glomr-lib/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (12)Versions (21)Used By (1)

Glomr Static Site Builder
=========================

[](#glomr-static-site-builder)

Glomr-lib is the library implementation for Glomr
-------------------------------------------------

[](#glomr-lib-is-the-library-implementation-for-glomr)

Glomr is yet another static site builder and has the following features:

- Pure PHP implementation, no other runtimes or binary dependencies
- Lightweight
- Extensible - easy to add new Builders for other template languages or content types
- Natively uses [Blade](http://laravel.com/docs/5.6/blade) - the templating system from [Laravel](https://laravel.com/)

### instalation:

[](#instalation)

composer install tedmoyses/glomr-lib

### usage

[](#usage)

Glomr reads content from ./source directory in your project and outputs formatted HTML to ./build directory. These paths the are defaults but can be configured with the setPath method on the BuildContext class

```
//make principle classes
$buildContext = new Glomr\Build\BuildContext();
$buildService = new Glomr\Build\BuildService($buildContext);

// make builders
$bladeBuilder = new Glomr\Build\BladeBuilder($buildContext);
$assetBuilder = new Glomr\Build\assetBuilder($buildContext);
// ... instantiate any other Builders

// register builders
$bladeBulder->registerBuilder($bladeBuilder);
$bladeBulder->registerBuilder($assetBuilder);

// build!
$buildService->build();

```

The BladeBuilder class will look for templates in ./source/templates named \*.blade.php It is recommended to places layouts, partials and shared elements in their own directory outside/above templates. Variables to be used in Blade templates can be passed in an associative array to the BuildService class method build. The templates path is a switchable context exposed by the BladeBuilder method setContext

Glomr has a choice of watchers that will watch the source directory for file changes. The InotifyEventsWatche is the best choice if your OS/environment supports Inotiy Events, if not - or you notice that changes to source files do not trigger a build - then use the PollerWatcher. This will hold the php process in a loop using a configurable interval - to interupt the process a SIG\_INT or Ctrl + C will stop the process.

```
$watcher = new Glomr\Watch\InotifyEventsWatcher($buildContext);
while ($watcher->watchBuild()){
  $buildService->build();
}

```

There is an internal service to serve up the built content - by default this service is bound to 0.0.0.0 on port 8080. To start the server, use the runServer method from the BuildService class - you can pass parameters here to configure the server bind address, port and document root. This will start a background process the should be closed down in response to a SIG\_INT or Ctrl + C

### configuration

[](#configuration)

Watcher intervals are measured in milliseconds and passed as the second param in the constructor or in the watch method on the build service as the first parameter.

You can enable debug level logging using Logr::setdebug(true)

To force the watcher used by BuildService to be the poller, use true as the second parameter to the watch method

To enable 'low' or 'high' compression for the Asset Builders either set the second parameter as a string value 'low' or 'high' in the constructor or use the setCompression method. Default is none

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~15 days

Recently: every ~0 days

Total

19

Last Release

2620d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4174d0226626d5fc856e8083ed67c565f5d55abfcee18417107642f7e716a445?d=identicon)[tedmoyses](/maintainers/tedmoyses)

---

Top Contributors

[![tedmoyses](https://avatars.githubusercontent.com/u/7114210?v=4)](https://github.com/tedmoyses "tedmoyses (26 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tedmoyses-glomr-lib/health.svg)

```
[![Health](https://phpackages.com/badges/tedmoyses-glomr-lib/health.svg)](https://phpackages.com/packages/tedmoyses-glomr-lib)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.4k37.3k](/packages/matomo-matomo)

PHPackages © 2026

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