Skip to content

xepozz/assets

 
 

Yii Assets


The package impements clietside asset (such as CSS and JavaScript) management for PHP. It helps resolving dependencies and getting lists of files ready for generating HTML <script and <link tags.

Latest Stable Version Total Downloads Build Status Scrutinizer Code Quality Code Coverage Mutation testing badge static analysis

Installation

The package could be installed via composer:

composer require yiisoft/assets

Usage

There are three main steps using the package:

  1. Define asset bundles. These are config classes defining where your assets are and how they should be used.
  2. Register bundles to asset manager and obtain list of files to include.
  3. Optionally use asset converter with asset bundle for asset format conversion (such as TypeScript to JavaScript).
  4. Use your favorite method to include files into HTML (out of scope of this package).

Unit testing

The package is tested with PHPUnit. To run tests:

./vendor/bin/phpunit

Mutation testing

The package tests are checked with Infection mutation framework. To run it:

./vendor/bin/infection

Static analysis

The code is statically analyzed with Phan. To run static analysis:

./vendor/bin/phan

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.9%
  • CSS 0.1%