Download the PHP package tekton/assets without Composer
On this page you can find all versions of the php package tekton/assets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tekton/assets
More information about tekton/assets
Files in tekton/assets
Package assets
Short Description An asset manager that can easily read manifests and also compile and combine assets.
License MIT
Homepage https://github.com/tekton-php/assets
Informations about the package assets
Tekton Assets
An asset manager that supports asset manifests, queues and compilation/minification.
Installation
Usage
Basic
The AssetManager and AssetCompiler can be used separately but are designed to work together to make asset management and processing as simple and pain free as possible.
To use it, create an instance of AssetManager and provide the filesystem and web root for your application.
Queues are a way to group different assets together similarily to how WordPress handles assets. Dependencies can be defined and the resulting list will be sorted in order.
If assets are revisioned for cache busting as a build system step you can load the manifest and the AssetManager will first try and resolve the asset through the manifest before checking the filesystem. An AssetManifest require a cache directory so that JSON/YML files aren't parsed every request.
Compilation
The AssetManager also supports configuring an AssetCompiler that enables processing of files server side.
For whenever cache needs to be invalidated by testing more than just one source file you can add an array of files to check for changes.
Performance
As much as possible is cached to avoid filesystem interactions and recompilation. But for production it's advisable to disable file modification time checks (especially if you're compiling SCSS with many additional files to test for changes) and only compile if resulting file is missing. Then you'll have to empty the cache manually or as a post-deployment step.
License
MIT