buuum/templategen

为您的应用程序生成模板

v1.0.0 2017-03-15 16:00 UTC

This package is auto-updated.

Last update: 2024-09-17 20:55:40 UTC


README

Packagist license

安装

系统要求

您需要PHP >= 5.5.0来使用Buuum\templategen,但建议使用最新稳定的PHP版本。

Composer

Buuum\templategen可在Packagist上找到,并可以使用Composer进行安装。

composer require buuum/templategen

手动安装

只要您的自动加载器遵循PSR-0或PSR-4标准,您就可以使用自己的自动加载器。只需将src目录的内容放入您的vendor目录中。

初始化

php vendor/bin/templategen init

yaml配置输出

groups:
  group1:
    title: Grupo 1
    templates:
      template1:
        srcs:
          - test/demo/template.php
        dest:
          - test/--file--.php
        questions:
          question1:
            title: ¿En que carpeta pondremos esto?
            replaces:
              - --folder--
              - --upper-folder--:
                - uppercase: true
              - --folder-pre-su--:
                - prefix: \
                - suffix: \
          question2:
            title: ¿Nombre del archivo de esto?
            replaces:
              - --file--

生成

php vendor/bin/templategen generate

许可协议

MIT许可协议(MIT)

版权所有 (c) 2017

在此特此授予任何获得本软件及其相关文档副本(以下简称“软件”)的人免费使用软件的权利,不受任何限制,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或出售软件副本的权利,并允许软件的提供者执行上述操作,前提是遵守以下条件

上述版权声明和本许可声明应包含在软件的任何副本或主要部分中。

本软件按“原样”提供,除非明确说明,否则不提供任何形式的保证,无论是明示的、暗示的,还是与软件的适用性、特定用途无关的、侵权等相关的保证。在任何情况下,作者或版权持有人均不对任何索赔、损害或其他责任承担责任,无论源于合同、侵权或其他法律行为,均与软件或其使用或其他操作无关。