Gulp plugin for including HTML files into each other. Made for fun and my personal needs, but I'll appreciate if anyone will use it \( ﾟヮﾟ)/
I know, there are some long-time solutions like gulp-file-include, but I wanted to create something on my own with html-like syntax.
Supports nested partials and passing parameters as attributes.
npm install --save-dev gulp-html-partial
Files are included in
@@titleSome spanSome text
Some text@@param@@dashed-paramSome text
Some titleSome spanSome textSome textNested partialSome-dashed-paramSome text
const gulp = ;const htmlPartial = ;gulp;
const defaults =basePath: ''tagName: 'partial'variablePrefix: '@@'
basePath- base path for your partials, relative to
tagName- name of your partial tag, must have at least
srcattribute with path to partial file
variablePrefix- prefix of variable keys passed as attributes into partials