gulp-lb-include
Library for using lb-include
as a gulp
plugin
Builds hosted by Travis CI:
master
: ,
develop
:
Install
$ npm install --save-dev gulp-lb-include
Getting Started
It's easy to use!
var gulp = ;var lbInclude = ; gulp;
You can also npm install
and use gulp-plumber
to tidily log
any errors that might get emitted, instead of having to trap and log them yourself:
var gulp = ;var plumber = ;var lbInclude = ; gulp;
Configuration
You can pass an optional configuration object, which will be passed through to lb-include
.
gulp;
You can pass any option supported by lb-include
(see the documentation for lb-include
for the entire list), aside from fileContents
. This plugin will set fileContents
to the file contents provided by gulp
.
Root Directory
In the examples above, the base
directory
from gulp.src
will be used to resolve root-relative #include
s like <!-- #include file="/templates/nav.html" -->
By default, the base
directory in gulp.src
is everything before the glob
pattern (see the README for
glob2base
for details).
If you wish to use a different directory for resolving root-relative #include
s, you can do so by passing
the root
option to lb-include
gulp;
Tests
To run the tests, checkout this repo and then npm install && npm test
.
To rerun the tests automatically as you edit files, use npm run test-watch
instead.
License
Released under the MIT license © Jeffrey Stanton
See LICENSE.md for full license text