magentron / laravel-blade-lint
Laravel Blade Lint 控制台命令
2.0.2
2018-11-28 14:07 UTC
Requires
- ext-pcntl: *
- laravel/framework: *
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-25 09:30:38 UTC
README
Laravel 控制台命令,用于检查 blade 模板语法。
要求
可能也适用于较低版本,但尚未测试。
- PHP 5.6 或更高版本,至少需要 PCNTL 扩展
- Laravel 5.4 或更高版本
安装
通过 composer 添加包
composer require --dev magentron/laravel-blade-lint
对于 Laravel 版本小于 5.5,编辑 config/app.php
,将以下内容添加到 providers
数组中
Magentron\BladeLinter\Providers\ServiceProvider::class,
用法
从命令行运行
php artisan blade:lint
它将自动确定系统拥有的 CPU 核心数,并通过启动子工作进程来使用所有核心(需要 PHP POSIX 扩展)。
您可以使用不同的详细级别以获取更详细的信息。
标准帮助输出
$ php artisan blade:lint -h
Description:
Laravel Blade Lint - syntax checking of blade templates
Usage:
blade:lint [options] [--] [<path>...]
Arguments:
path
Options:
--debug Enable debug output, which consists of the compiled templates (PHP code)
-p, --processes[=PROCESSES] The number of test processes to run. [default: "auto"]
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
报告错误/问题
如果您发现错误,请在 GitHub 上报告错误
https://github.com/Magentron/laravel-blade-lint/issues.
作者
许可
Laravel Blade Lint 是自由软件:您可以在自由软件基金会发布的 GNU 通用公共许可证的条款下重新分发和/或修改它,许可证版本为 3 或(根据您的要求)任何后续版本。
Laravel Blade Lint 的分发是希望它有用,但没有任何保证;甚至没有关于其商业性或针对特定目的的适用性的暗示保证。有关详细信息,请参阅 GNU 通用公共许可证。
您应已收到 Laravel Blade Lint 一起的 GNU 通用公共许可证副本。如果没有,请参阅 https://gnu.ac.cn/licenses/。