library assets
SugiPHP Assets Management Component based on Assetic
sugiphp/assets
SugiPHP Assets Management Component based on Assetic
- Friday, March 6, 2015
- by tzappa
- Repository
- 1 Watchers
- 1 Stars
- 342 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 1 Versions
- 1 % Grown
SugiPHP Asset Manager
, (*1)
SugiPHP\Assets simplifies use of a well know asset management
framework for PHP Assetic., (*2)
CssPacker
Packs and minifies CSS stylesheet files. It can process LESS files as
well., (*3)
$config = array(
"input_path" => "/path/to/your/assets",
"output_path" => "/path/to/webroot/css",
"debug" => true
);
$css = new CssPacker($config);
// add several files atones
$css->add(array("reset.css", "common.css"));
// add one file
$css->add("pages/index.css");
// add a file not from the default input path:
$css->add("/absolute/path/to/stylesheet.css");
// In your template file:
<link rel="stylesheet" href="/css/<?php echo $css->pack(); ?>" />
// This will pack all assets in one and minify* them. Then the result
// will be saved in a file. Return a filename.
// *Minification will only be done if "debug" configuration option is
// FALSE. This makes debugging easier.
// If you want to get the contents only and not saving it in a file:
<style type="text/css">
pack(false); ?>
</style>
JsPacker
JsPacker works in a same way as a CssPacker. Enjoy!, (*4)
dev-master
9999999-dev
SugiPHP Assets Management Component based on Assetic
Sources
Download
MIT
The Requires
The Development Requires
by
Plamen Popov
css
javascript
assets
less
assetic