1.0.7 • Published 10 years ago

phptpl v1.0.7

Weekly downloads
1
License
ISC
Repository
github
Last release
10 years ago

phptpl

Static HTML template engine for template developer

Install =

Make sure you have PHP installed in your $PATH first. Then run:

npm install -g phptpl

Start a project

phptpl create example

Use 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
  .tpl

Rules:

  • Source files in src directory
  • Generated HTML files in dist directory
  • JavaScript and CSS files are copied as is.
  • Source files with .inc.php in filename won't be generated to html.
  • You can use all the php helpers function to help you build the template (ex. for loop, if else conditions, include_once, and more...)

Build the html files:

Navigate to project directory and run:

phptpl build
1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

11 years ago

1.0.4

11 years ago

1.0.3

11 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago