Download the PHP package minicli/command-stencil without Composer
On this page you can find all versions of the php package minicli/command-stencil. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download minicli/command-stencil
More information about minicli/command-stencil
Files in minicli/command-stencil
Package command-stencil
Short Description A Minicli command to generate files based on minicli/stencil templates
License MIT
Homepage https://github.com/minicli/command-stencil
Informations about the package command-stencil
Minicli Stencil Command
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:
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:
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:
Then, run ./minicli stencil
with the template set to example
, providing the expected variable name
:
Output content to a file
Include an output=full-path-to-file
to save the parsed content to a file:
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.