Skip to content
We Are Indi edited this page Dec 23, 2018 · 3 revisions

Included Commands

php pillar server

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.


php pillar export or php pillar export --library

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/)


php pillar export --assets

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/)


Add your own commands

The Symfony documentation should help here: https://symfony.com/doc/current/console.html#creating-a-command

Quick start steps:

  1. Duplicate ./App/ConsoleCommands/ExampleCommand.php and name it MyCommand.php
  2. Change the class name in MyCommand.php from ExampleCommand to MyCommand.
  3. Amend the setName and setDescription methods to suit your command. (mycommand and my commands description).
  4. Following the ExampleCommand in the pillar file, php include the custom command and add it the the Console array as shown by the ExampleCommand.
  5. Run php pillar mycommand to execute.