adrifkat/grumphp-stylelint-task
Composer 安装命令:
composer require adrifkat/grumphp-stylelint-task
包简介
GrumPHP stylelint task
README 文档
README
Installation
Stylelint is a static analysis tool for styles. A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.
composer require --dev adrifkat/grumphp-stylelint-task
npm
1. Use npm to install stylelint and its standard configuration:
npm install --save-dev stylelint stylelint-config-standard
2. Create a .stylelintrc.json configuration file in the root of your project:
{
"extends": "stylelint-config-standard"
}
Config
It lives under the stylelint namespace and has the following configurable parameters:
# grumphp.yml grumphp: tasks: stylelint: triggered_by: [css, scss, less] whitelist_patterns: - /^resources\/css\/(.*)/ config: .stylelintrc.json max-warnings: 5 quiet: false services: Adrifkat\GrumPHPStylelint\StylelintTask: arguments: - '@process_builder' - '@formatter.raw_process' tags: - { name: grumphp.task, task: stylelint }
triggered_by
Default: [less, sass, scss, css]
This is a list of extensions which will trigger the Stylelint task.
whitelist_patterns
Default: []
This is a list of regex patterns that will filter files to validate. With this option you can specify the folders containing style files and thus skip folders like the /vendor/ directory. This option is used in conjunction with the parameter triggered_by.
For example: to whitelist files in resources/css/ (Laravel's CSS directory) you can use:
whitelist_patterns: - /^resources\/css\/(.*)/
config
Default: null
Path to a JSON, YAML, or JS file that contains your configuration object. Not necessary if using a standard stylelintrc name, eg. .stylelintrc.json
max-warnings
Default: null
Set a limit to the number of warnings accepted. (stylelint.io).
quiet
Default: null
Only register violations for rules with an "error"-level severity (ignore "warning"-level). (stylelint.io)
adrifkat/grumphp-stylelint-task 适用场景与选型建议
adrifkat/grumphp-stylelint-task 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.16k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2021 年 04 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 adrifkat/grumphp-stylelint-task 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 adrifkat/grumphp-stylelint-task 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-05