creativeservices / workshop
This package is abandoned and no longer maintained.
No replacement package was suggested.
Preview Twig templates in the browser
v1.0.0-beta2
2018-11-27 16:57 UTC
Requires
- php: >=7.0
- eloquent/pathogen: ^0.6.1
- symfony/console: ~3.4|^4.1
- symfony/http-foundation: ~3.4|^4.1
- symfony/process: ~3.4|^4.1
- twig/twig: ~1.20|~2.0
Requires (Dev)
- phpunit/phpunit: ~7.4
This package is auto-updated.
Last update: 2022-03-28 03:58:57 UTC
README
Create a workshop.php
file:
<?php
$templatesDir = '/path/to/templates';
$twig = new \Twig_Environment(new \Twig_Loader_Filesystem($templatesDir));
$this->setTwig($twig);
$templates = new TemplateDirectory($templatesDir);
$this->setTemplates($templates);
Start the workshop server:
./vendor/bin/workshop serve workshop.php
View the workshop at http://localhost:8000.