-
Notifications
You must be signed in to change notification settings - Fork 0
CLI
This will boot a standard PHP internal server.
Define the host and port used in your .env
file using the following parameters:
HOST=
PORT=
If these are empty they will default to localhost
and 8080
respectively.
This command will take your library and copy the templates only to your desired destination. Keeping directory structure
Define an absolute destination path in your .env
file using the following parameters:
# Patterns
EXPORT_LIBRARY_DEST=
Library is copied from A to B with filtering.
This will maintain the directory structure but only export your .twig
files.
The EXPORT_LIBRARY_DEST should be an absolute path to a destination of your choice: (eg. /mnt/e/Work/Projects/m/my-wordpress-timber-project/web/app/themes/my-theme/views/)
This command will take a defined directory and copy it complete to your desired destination without any filtering of content.
Note: I use this command to copy compiled assets from Pillar to a destination (Commonly a WordPress theme directory).
Define absolute source and destination paths in your .env
file using the following parameters:
# Patterns
EXPORT_ASSETS_SRC=
EXPORT_ASSETS_DEST=
The EXPORT_ASSETS_SRC
should be an absolute path to your compiled assets directory:
(eg. /mnt/e/Work/Projects/m/my-pillar-project/assets/
.)
The EXPORT_ASSETS_DEST
should be an absolute path to a destination of your choice:
(eg. /mnt/e/Work/Projects/m/my-wordpress-timber-project/web/app/themes/my-theme/assets/
)
The Symfony documentation should help here: https://symfony.com/doc/current/console.html#creating-a-command
Quick start steps:
- Duplicate
./App/ConsoleCommands/ExampleCommand.php
and name itMyCommand.php
- Change the class name in
MyCommand.php
fromExampleCommand
toMyCommand
. - Amend the
setName
andsetDescription
methods to suit your command. (mycommand
andmy commands description
). - Following the
ExampleCommand
in thepillar
file, php include the custom command and add it the the Console array as shown by theExampleCommand
. - Run
php pillar mycommand
to execute.