jnjxp/phender

CLI php 模板

0.1.0 2020-09-27 05:24 UTC

This package is auto-updated.

Last update: 2024-08-27 13:58:47 UTC


README

快速且简单的 CLI php 模板渲染。

用法

查看示例目录...

$ ./bin/phender \
    -i articles:./example/article-data.php \
    -v "site:My Site" \
    -h ./example/helpers.php \
    ./example/template/articles.phtml \
    ./example/template/layout.phtml > articles.html
  • -i/--include VAR:PATHVAR 设置为包含 PATH 返回的值
  • -v/--var VAR:VALUEVAR 设置为 VALUE
  • -h/--helpers PATH 将辅助函数设置为包含 PATH 返回的值。应返回一个可调用的数组。