【文件属性】:
文件名称:SimpleView:基于 Laravel 的 Blade 视图引擎的简单视图引擎
文件大小:79KB
文件格式:ZIP
更新时间:2021-06-20 09:06:47
template laravel template-engine blade template-compile
简单视图
这个项目是一个简单的模板编译器,旨在与兼容。
但它是不同的,因为它生成的代码完全不依赖于这个项目运行,因此它可以离线编译模板一次。
如何使用它
使用编译器的最简单方法是下载phar cli 应用程序。
wget https://github.com/crodas/SimpleView/raw/master/view-compiler.phar -O view-compiler
chmod +x view-compiler
现在您已准备好运行view-compiler脚本。 现在使用非常简单:
./view-compiler compile tests/views/
这将生成一个单独的文件tests/views/Templates.php其中包含我们编译的所有模板。
require "tests/views/Templatas.php" ;
// By defualt
【文件预览】:
SimpleView-master
----composer.json(627B)
----.travis.yml(161B)
----phpunit.xml(1KB)
----service.php(569B)
----tests()
--------css()
--------bootstrap.php(533B)
--------Templates.php(42KB)
--------MainTest.php(2KB)
--------views()
--------error()
--------ErrorTest.php(2KB)
----.gitignore(45B)
----lib()
--------SimpleView()
----Makefile(350B)
----README.md(1KB)
----cli.php(5KB)