1.0.7 • Published 10 years ago
phptpl v1.0.7
phptpl
Static HTML template engine for template developer
Install =
Make sure you have PHP installed in your $PATH first. Then run:
npm install -g phptplStart a project
phptpl create exampleUse your favorite PHP web server to preview.
Project Structure
▾ dist/
▸ css/
▸ js/
index.html
▾ src/
▸ css/
▸ js/
footer.inc.php
header.inc.php
index.php
.tplRules:
- Source files in
srcdirectory - Generated HTML files in
distdirectory - JavaScript and CSS files are copied as is.
- Source files with
.inc.phpin filename won't be generated to html. - You can use all the php helpers function to help you build the template (ex.
forloop,ifelseconditions,include_once, and more...)
Build the html files:
Navigate to project directory and run:
phptpl build