A PHP Command Line tool for compiling Twig template files.
composer require-dev itsahappymedium/ttc
./vendor/bin/ttc help
composer global require itsahappymedium/ttc
ttc help
# Compiles all .twig files in the `templates` directory recursively
# Using variables from the `staging-server` object in `config.yml`
# Placing all generated files in the `public` directory
ttc -r -s templates -d public -f config.yml -b staging-serverAt the very least, one of input or source options are required.
-
--arguments-file/-f- A file to load twig arguments/variables from. -
--arguments-file-type/-t- The type of filearguments-fileis. (Possible values:env,json,yml) (If omitted, the file type will be automatically determined based on the file extension.) -
--arguments-file-base/-b- A dot-notation path inside ofarguments-filewhere the arguments/variables should be loaded from. -
--destination/-d- The directory to place the generated files in. (If omitted, the files will be placed in the same directory as the twig files) -
--input/-i- An individual twig file to compile. -
--output/-o- The path where the individual compiled file should go. (Used in combination withinput) (If omitted, the compiled file will be placed in the same directory as the twig file) -
--source/-s- The directory where the twig files are.
--recursive/-r- Sets whether or not thesourcedirectory should be searched recursively. (Only used when thesourceoption is used)
-
FEC - A PHP Command Line tool that makes it easy to compile, concat, and minify front-end Javascript and CSS/SCSS dependencies.
-
GPM - A PHP Command Line tool that makes it easy to download dependencies from GitHub.
MIT. See the license.md file for more info.