phaldan / asset-builder
1.1.0
2017-11-29 13:15 UTC
Requires
- beelab/bowerphp: 1.0.*@dev
- leafo/scssphp: 0.*
- league/flysystem: ^1.0
- league/flysystem-cached-adapter: ^1.0
- oyejorge/less.php: ~1.7.0.9
- tedivm/jshrink: ~1.0
- tubalmartin/cssmin: ^2.4
Requires (Dev)
- ext-xdebug: ^2.2
- phpunit/phpunit: 4.8.10
This package is not auto-updated.
Last update: 2024-11-13 18:54:36 UTC
README
PHP library to define bundles based on dynamic lists of JavaScript and CSS files via glob. Additional features are JavaScript and CSS minification. Also supports LESS and SASS to CSS transformation.
Usage
use Phaldan\AssetBuilder\AssetBuilder; $app = new AssetBuilder(); print $app->createProduction(__DIR__.DIRECTORY_SEPARATOR, 'assets/css') ->addGroups([ "bundle.css" => $app->getGlobFileList([ "assets/css/bootstrap.min.css", "modules/*/css/*.css", "modules/*/css/*.scss", "modules/*/css/*.less", ]), "bundle.js" => $app->getGlobFileList([ "assets/js/jquery.min.js", "assets/js/bootstrap.min.js", "modules/*/js/*.js", ]) ]) ->setCachePath(__DIR__.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR) ->execute($_GET["bundle"]);