1.0.0 • Published 6 years ago

gulp-fluid v1.0.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
6 years ago

Fluid template engine for gulp

This module allows to use the fluid template engine with gulp.

Installation

Use your favourite package manager to add to your project:

# NPM
npm install --save gulp-fluid

# Yarn
yarn add gulp-fluid

Usage

Use the module like any other gulp plugin:

const gulp = require("gulp")
const fluid = require("gulp-fluid")
const vars = require("./data.json")

gulp.task("templates", () => {
  return gulp.src("./src/templates/*.html")
    .pipe(fluid({variables: vars}))
    .pipe(gulp.dest("./build/html"))
})

The function takes a simple object for configuration. It can have the following properties:

PropertyDescription
phpPath to php executeable, defaults to "php"
variablesAny object that can be JSON serialized, passed as variables to fluid
layoutPathsArray of strings, containing path(s) to layout files
partialPathsArray of strings, containing path(s) to partial files

License

Apache License 2.0

Please see the file LICENSE, which is part of this package, or visit https://www.apache.org/licenses/LICENSE-2.0