netzmacht/assetic-autoprefixer
Composer 安装命令:
composer require netzmacht/assetic-autoprefixer
包简介
autoprefixer-php filter for kriswallsmith/assetic
关键字:
README 文档
README
Autoprefixer filter
This is a filter implementation to use Autoprefixer within the PHP assetic framework.
Requirements
kriswallsmith/assetic is required to be installed in your php project.
postcss/autoprefixer is required to be installed on your system.
Install kriswallsmith/assetic with composer
php composer.phar require kriswallsmith/assetic ~1.0
Install autoprefixer globally on your system
sudo npm install -g autoprefixer
Install autoprefixer locally on your system
npm install autoprefixer
Usage in PHP
use Bit3\Assetic\Filter\Autoprefixer\AutoprefixerFilter; // if you have installed autoprefixer globally $autoprefixerBinary = '/usr/bin/autoprefixer'; // if you have installed autoprefixer locally $autoprefixerBinary = '/../node_modules/.bin/autoprefixer'; $autoprefixerFilter = new AutoprefixerFilter($autoprefixerBinary); // if node.js binary is not installed as /usr/bin/node // (e.g. on debian/ubuntu the binary is named /usr/bin/nodejs) $autoprefixerFilter->setNodeBin('/usr/bin/nodejs');
Usage in Symfony2
This project comes with a assetic filter configuration file, located in the config directory.
Define the autoprefixer binary path in the parameters.yml:
parameters: # if you have installed autoprefixer globally assetic.autoprefixer.bin: /usr/bin/autoprefixer # if you have installed autoprefixer locally assetic.autoprefixer.bin: %kernel.root_dir%/../node_modules/.bin/autoprefixer # if node.js binary is not installed as /usr/bin/node # (e.g. on debian/ubuntu the binary is named /usr/bin/nodejs) assetic.node.bin: /usr/bin/nodejs
Then enable the filter in the assetic configuration chapter:
# Assetic Configuration assetic: filters: autoprefixer: resource: "%kernel.root_dir%/../vendor/netzmacht/assetic-autoprefixer/config/autoprefixer.xml" # if you like, you can use apply_to here :-) # e.g, apply_to: "\.css" # otherwise you use the filter in your template with filter="autoprefixer"
netzmacht/assetic-autoprefixer 适用场景与选型建议
netzmacht/assetic-autoprefixer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 51.54k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2015 年 02 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「assets」 「css」 「vendor-prefix」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 netzmacht/assetic-autoprefixer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 netzmacht/assetic-autoprefixer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 netzmacht/assetic-autoprefixer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Asset Management for PHP
A Twig extension to insert css as inline styles with a tag
Caching and compression for Twig assets (JavaScript and CSS).
Tool for loading or deploying CSS and JS files into web pages
Define your own css rule-sets for the TYPO3 CMS backend.
Laravel theme manager, that will help you organize and maintain your themes inside Laravel projects.
统计信息
- 总下载量: 51.54k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 18
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-05