1.0.1 • Published 4 years ago

gulp-php2html v1.0.1

Weekly downloads
131
License
MIT
Repository
github
Last release
4 years ago

gulp-php2html NPM version Build Status Dependency Status

php2html plugin for gulp

Usage

First, install gulp-php2html as a development dependency:

npm install --save-dev gulp-php2html

Then, add it to your gulpfile.js:

var php2html = require("gulp-php2html");

gulp.src("./src/*.php")
	.pipe(php2html())
	.pipe(gulp.dest("./dist"));

With router

var php2html = require("gulp-php2html");

php2html.routes(['/my/route','/will/be/processed','/by/router.php'])
	.pipe(php2html({router: 'router.php'}))
	.pipe(gulp.dest("./dist"));

To make this work you need the php-cgi binaray in your PATH.

Installing php-cgi

OSX

The php-cgi binary can be installed via Homebrew by tapping the homebrew-php repository:

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php56
Windows

The php-cgi binary can be installed via XAMPP. Here is how you can add the binary to your PATH: Link

Ubuntu
sudo apt-get install php5-cgi

API

php2html(options)

options.verbose

Type: Boolean Default value: false

Print debug output to the console

options.haltOnError

Type: Boolean Default value: true

Set to false to write dest html files on error. Usefull for debugging.

See php2html for a full list of options.

License

MIT License

1.0.1

4 years ago

1.0.0

4 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago