crodas / asset
Very simple asset manager
v0.1.2
2014-09-05 21:19 UTC
Requires
- crodas/file-util: >=0.1.7
- crodas/service-provider: >=0.1.17
- leafo/lessphp: *
- leafo/scssphp: *
- patchwork/jsqueeze: *
This package is auto-updated.
Last update: 2024-10-12 19:33:26 UTC
README
Extremely simple asset manager for PHP. If you need anything advanced I'd recommend you to take a look at Assetic.
How does it work?
You need to configure it
\crodas\Asset\Configure::get() ->store('/tmp/map.php') // It is where temporary info is stored, to speed up things ->detDir('js', __DIR__ . '/public/js', '/js') ->setDir('css', __DIR__ . '/public/css', '/css');
Then you can simple call it from your views
echo Asset::css('base.css', 'style.css'); echo Asset::js('jquery.js', 'jquery-ui.js');
Todo
- Add unit tests
- Less/scss support
- Ability to define packages ahead of time (for instance define
jquery.js
=jquery.js
+jquery-ui.js
)