kriswallsmith/assetic
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
symfony/process | v3.4.47 | - | MIT | prod |
The Kriswallsmith/assetic is an adept asset management framework for PHP, aimed at offering excellent control over your CSS, JavaScript, and image files. It's known for providing utilities for file combination, versioning, and many other features which essentially reduce the load time for your web pages.
To use Kriswallsmith/assetic in your PHP applications, you would first need to include it in your project using Composer. It can then be consumed by creating instances of various classes, such as AssetCollection
, FileAsset
, GlobAsset
, etc., depending on your use case. Here's an example of how it can be employed:
<?php
use Assetic\Asset\AssetCollection;
use Assetic\Asset\FileAsset;
use Assetic\Asset\GlobAsset;
$js = new AssetCollection(array(
new GlobAsset('/path/to/js/*'),
new FileAsset('/path/to/another.js'),
));
echo $js->dump();
In the above snippet, an AssetCollection
is created containing a GlobAsset
and a FileAsset
. The dump
method is then called to combine the resources into a single string.
The documentation for Kriswallsmith/assetic can be found directly within its repository, hosted on GitHub. Detailed instructions and usage examples are provided in the readme file of the repository. Moreover, a description of each class and its methods can be found in the source files within the repo, annotated as comments against most declarations.