Download the PHP package tedmoyses/glomr-lib without Composer
On this page you can find all versions of the php package tedmoyses/glomr-lib. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tedmoyses/glomr-lib
More information about tedmoyses/glomr-lib
Files in tedmoyses/glomr-lib
Package glomr-lib
Short Description The library implemenation of Glomr the static stite builder
License MIT
Informations about the package glomr-lib
Glomr Static Site Builder
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 - the templating system from Laravel
instalation:
composer install tedmoyses/glomr-lib
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
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.
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
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
All versions of glomr-lib with dependencies
monolog/monolog Version ^1.23
bramus/monolog-colored-line-formatter Version ~2.0
symfony/process Version ~3.0
kriswallsmith/assetic Version ^1.4
patchwork/jsqueeze Version ^2.0
matthiasmullie/minify Version ^1.3
tedivm/jshrink Version ^1.3
illuminate/filesystem Version ^5.7
symfony/finder Version ^4.1
league/flysystem Version ^1.0