wshafer / assetmanager
此包已被 废弃 并不再维护。未建议替代包。
Zend Framework 的 assetmanager 模块。
2.0.0-beta2
2017-12-27 21:57 UTC
Requires
- php: ^5.6 || ^7.0
- wshafer/assetmanager-core: ^1.0.0
- zendframework/zend-component-installer: ^1.0 || ^0.7.0
- zendframework/zend-modulemanager: ^2.8.0
- zendframework/zend-mvc: ^3.1.0
- zendframework/zend-psr7bridge: ^0.2.2
Requires (Dev)
- phpunit/phpunit: ^5.7
- squizlabs/php_codesniffer: ~3.0
- zendframework/zend-cache: ^2.7.1
- zendframework/zend-mvc-console: ^1.1
Suggests
- zendframework/zend-mvc-console: zend-mvc-console provides the ability to expose zend-mvc as a console application
Provides
README
AssetManager For Zend Framework
由 ZF2 Assetmanager 衍生,作者为 Wesley Overdijk 和 Marco Pivetta
简介
此模块旨在与 ZendSkeletonApplication 的默认目录结构一起使用。它通过简单的配置提供加载模块目录中资产和静态文件的功能。这允许您无需将文件复制到 public/
目录,并且使用资产的方式与视图脚本相似,可以被其他模块覆盖。总之,此模块允许您直接与模块一起打包资产。
安装
- 需要 assetmanager
./composer.phar require wshafer/assetmanager:2.0.0-beta2
使用
请参阅 wiki 以获取快速入门和更多信息。许多主题,如果不是全部,都已在其中深入讨论。
示例模块配置
<?php return array( 'asset_manager' => array( 'resolver_configs' => array( 'collections' => array( 'js/d.js' => array( 'js/a.js', 'js/b.js', 'js/c.js', ), ), 'paths' => array( __DIR__ . '/some/particular/directory', ), 'map' => array( 'specific-path.css' => __DIR__ . '/some/particular/file.css', ), ), 'filters' => array( 'js/d.js' => array( array( // Note: You will need to require the classes used for the filters yourself. 'filter' => 'JSMin', ), ), ), 'view_helper' => array( 'cache' => 'Application\Cache\Redis', // You will need to require the factory used for the cache yourself. 'append_timestamp' => true, // optional, if false never append a query param 'query_string' => '_', // optional ), 'caching' => array( 'js/d.js' => array( 'cache' => 'Apc', ), ), ), );
请注意,由于此模块将作为原始文件提供每个文件,包括 PHP 代码,因此请谨慎使用。
问题 / 支持
如果您在使用资产管理器时遇到问题,以下资源可能会有所帮助。
- 常见问题解答 wiki 页面,您可能会在那里找到答案。
- 问题跟踪器。(请尽量不要提交无关的问题)。