gulp-file-includer
A file include plugin for gulp 3
Installation
First, install gulp-file-includer
as a development dependency:
npm install --save-dev gulp-file-includer
Usage
Add it to your gulpfile.js
:
var gulp = var fileincluder = gulp; gulp
index.html
@@include('./view.html') @@include('./var.html', {"name": "haoxin", "age": 12345})
view.html
view
var.html
@@name@@age
and the result is:
view haoxin12345
API
gulp-file-includer can be called with a config object with these attributes:
- prefix (defaults to '@@')
- suffix (defaults to '')
- basePath (defaults to '') If specified, the default root for the file path.
License
MIT