dotzero / yii-less
此包已被弃用且不再维护。未建议替代包。
Yii LessPhp 扩展允许开发者在实时编译 LESS 文件为 CSS,使用 LessPhp 编译器。
v1.0.0
2016-05-02 08:27 UTC
Requires
- php: >=5.3.0
- leafo/lessphp: >=0.5.0
- yiisoft/yii: >=1.1.14
This package is auto-updated.
Last update: 2022-06-04 08:35:14 UTC
README
ELessPhp 是一个针对 Yii PHP 框架 的扩展,允许开发者使用 LessPhp 编译器实时将 LESS 文件编译为 CSS。
要求
安装
通过 composer 安装
$ composer require dotzero/yii-less
- 将供应商路径添加到您的配置文件中,附加组件并设置属性
'aliases' => array( ... 'vendor' => realpath(__DIR__ . '/../../vendor'), ), 'components' => array( ... 'less' => array( 'class' => 'vendor.dotzero.yii-less.ELessCompiler', 'lessphpDir' => 'vendor.leafo.lessphp', // Path alias of lessc.inc.php directory 'forceCompile' => false, // Force recompile LESS into CSS every initializes the component 'files' => array( // Files to compile (relative from your base path) 'css/style.less' => 'css/style.css', 'css/userstyle.less' => 'css/userstyle.css', ), ), ),
- 在您的配置文件
preload
部分中添加以下内容
'preload' => array( ... 'less', ),
许可证
采用 MIT 许可证:[https://open-source.org.cn/licenses/mit-license.php](https://open-source.org.cn/licenses/mit-license.php)