Description
Scan PHP files in Gulp and process include and require statements to inline HTML snippets. The following are all handled...
- include
- require
- include_once
- require_once
Status
Requirements
- Gulp - v3.9.1 or newer
Install
npm install php-include-html --save-dev
Examples
- gulpfile.js
var gulp = ; var pump = ; var phpinc = ; var phpFiles = "index.php"; gulp;
- index.php
php-include-html<?php include("head.php");?> <!-- etc -->
- head.php
Configuration options
- verbose: Will output additional messages to the console (boolean - default: false)
- path: The base path of files if not same as gulpfile (string - default: "")