uzura8 / fuel-less
从 kriansa/fuel-less 分支而来,支持通过 composer 安装
dev-2.0/master
2015-03-22 11:05 UTC
Requires
This package is not auto-updated.
Last update: 2024-09-28 16:39:17 UTC
README
这是一个用于 Fuel 框架的 LESS 编译器包,使用 lessphp 由 @leafo 或 nodejs 实现。
LESS 在 CSS 的基础上扩展了动态行为,如变量、混合、操作和函数。
关于 lesscss 的更多信息: http://lesscss.org/
关于 lessphp 的更多信息: http://leafo.net/lessphp
2.0 新特性
- 在您的 less 包含文件中递归搜索修改
- 使用 LessPHP 实现 或 nodejs+node 官方实现编译您的 less
安装
从 Github 克隆。将其放置在 'packages_dir/less'
目录下,并在您的 app/config/config.php 中添加。
git clone --recursive git://github.com/kriansa/fuel-less.git
支持 Fuel 1.1+
使用方法
// will compile `less_source_dir`/style.less to base_url/assets/css/style.css and load it as CSS Asset::less('style.less'); // same syntax as Asset::css() Asset::less(array('style.less', 'file1.less', 'admin/style.less'));
配置
将 PKGPATH/less/config/less.php
复制到您的 APP/config/less.php
中并根据需要修改。您也可以在运行时修改这些配置
// Using the basic Config for the default Asset instance Config::set('asset.less_source_dir', APPPATH.'less/admin'); // Or using the new Asset Instance Asset::forge('custom', array('less_source_dir' => APPPATH.'less/admin'));
更新子模块
如果您想更新子模块(lessphp 和 lessjs)
git pull --recurse-submodules
许可证
Fuel LessCSS 包在 MIT 许可证下发布。
祝您玩得开心!