minicli/command-stencil 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

minicli/command-stencil

最新稳定版本:0.1.0

Composer 安装命令:

composer require minicli/command-stencil

包简介

A Minicli command to generate files based on minicli/stencil templates

README 文档

README

Command implementation of minicli/stencil. This command will generate files based on Stencil templates. It is useful for creating boilerplate files such as new classes and other documents that should follow a certain structure or template.

Usage

First, import this command with Composer:

composer require minicli/command-stencil

Then, edit your app's config to include @minicli/command-help within your app_path definitions. You'll also need to set the stencilDir config variable and point it to your Stencils directory. For instance:

$app = new App([
    'app_path' => [
            __DIR__ . '/app/Command',
            '@minicli/command-stencil'
        ],
    'stencilDir' => __DIR__ . '/stencils',
    'debug' => true
]);

You should now be able to run the ./minicli stencil command.

Testing templates

You can copy the example template from vendor/minicli/command-stencil/stencils/example.tpl to test it out:

cp ./vendor/minicli/command-stencil/stencils/example.tpl ./stencils

Then, run ./minicli stencil with the template set to example, providing the expected variable name:

./minicli stencil template=example name=YourName
Hello YourName!% 

Output content to a file

Include an output=full-path-to-file to save the parsed content to a file:

./minicli stencil template=example name=YourName output=test.txt
Hello YourName!% 

You should see a file named test.txt with the same output of the command. To suppress the command output, set debug to false in the app's configuration.

统计信息

  • 总下载量: 627
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固