Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

gulp-pagebuilder

0.1.4 • Public • Published

gulp-pagebuilder

Pagebuilder is a build and real time include engine for HTML, JavaScript, CSS and in general any type of text file that you wish to might want to "include" other files into.

Install

Install with npm.

npm install --save-dev gulp-pagebuilder

Examples

var gulp = require('gulp'),
    pagebuilder = require('gulp-pagebuilder'));
 
gulp.task('default', function () {
    gulp.src('src/*.html')
        .pipe(pagebuilder('src'))
        .pipe(gulp.dest('build/'));
});

How use it in sources

<div class="someclass" >
    [snp tpl="some/block/in/src/somefile.html" class="foo bar" ]
</div>

Content of some/block/in/src/somefile.html

<div class="otherclass {class}" >
    Some content
</div>

Result after compile

<div class="someclass" >
    <div class="otherclass foo bar" >
        Some content
    </div>
</div>

Keywords

none

install

npm i gulp-pagebuilder

Downloadsweekly downloads

4

version

0.1.4

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability