creativeservices / workshop
此包已被废弃,不再维护。未建议替换包。
在浏览器中预览Twig模板
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
创建一个 workshop.php
文件
<?php
$templatesDir = '/path/to/templates';
$twig = new \Twig_Environment(new \Twig_Loader_Filesystem($templatesDir));
$this->setTwig($twig);
$templates = new TemplateDirectory($templatesDir);
$this->setTemplates($templates);
启动workshop服务器
./vendor/bin/workshop serve workshop.php
在 https://:8000 查看workshop。