nsrosenqvist/blade-cli
Composer 安装命令:
composer require nsrosenqvist/blade-cli
包简介
Command line version of Laravel's Blade templating engine
README 文档
README
Blade CLI is a command line compiler for the Laravel Blade templating engine. You simply specify what templates you want to process as arguments.
Installation
To install you can either clone this repo and run composer install && composer build or simply retrieving the latest PHAR from the releases page.
I also have a convenience feature configured that install the PHAR to /usr/bin by running composer build:install but it makes a whole lot of assumptions of your OS and probably only works on Linux and macOS. Use at your own risk.
Usage
php blade-cli.phar [options] [--] <template> (<template>)...
Arguments
| Argument | Details |
|---|---|
<template> |
The template path can be specified as a relative URI, absolute and also as how Blade natively handles include references (pages/index.blade.php vs pages.index). If supplied as a Blade reference then a base directory must be set |
Options:
| Option | Details |
|---|---|
--data=DATA |
Variables passed on to the template as a JSON file/string or a PHP file returning an associative array (multiple values allowed) |
--output-dir=OUTPUT-DIR |
Output path relative from current working directory or absolute |
--base-dir=BASE-DIR |
Base directory to look for template files from. If not set, template's containing dir is assumed (multiple values allowed) |
--output-ext=OUTPUT-EXT |
When an output dir is specified you can also set what file extension the compiled template should be created with [default: "txt"] |
--extend=EXTEND |
This option accepts a path to a PHP file with user code to extend the compiler by using $compiler->extend() |
--dynamic-base |
Automatically add the parent directories of all templates as base directories. This requires a new Blade compiler instance for each template file which adds overhead but simplifies processing multiple templates at once and have each be a self-contained template hierarchy tree. This is not compatible with templates supplied as native Blade references |
-h, --help |
Display this help message |
-q, --quiet |
Do not output any message |
-V, --version |
Display this application version |
--ansi |
Force ANSI output |
--no-ansi |
Disable ANSI output |
-n, --no-interaction |
Do not ask any interactive question |
-v/vv/vvv, --verbose |
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug |
Development
Clone and run composer install. You can then run the app by executing php bin/blade from the root directory. To create a distributable PHAR you run composer build. To verify that templates are processed correctly you can run composer test.
nsrosenqvist/blade-cli 适用场景与选型建议
nsrosenqvist/blade-cli 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 03 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cli」 「terminal」 「laravel Blade」 「template compiler」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 nsrosenqvist/blade-cli 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nsrosenqvist/blade-cli 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 nsrosenqvist/blade-cli 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A fork of runcmf/runtracy
PHP Terminal emulator controller utilizing ANSI escape sequence coding.
Render small SVG icons to monochrome ANSI for terminal UIs (Laravel/Prompts, Symfony Console, plain CLI).
2020 PHP: A showcase and classroom for the cutting edge features of PHP 8
use laravel eloquent, view, pagination anywhere
Slim starter / Slim skeleton package to boost your development with Slim framework
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-15