gulp-shtml
v1.1.4
Published
A gulp plugin that parses ssi tags.
Downloads
198
Readme
A ssi plugin for Gulp. Only include directive supported currently.Works with both include types
<!--#include file="incs/inc.(s)html" --><!--#include virtual="../incs/inc.(s)html" -->Install
npm install gulp-shtml --save-devBasic Usage
Something like this will compile your Shtml files:
'use strict';
var gulp = require('gulp');
var shtml = require('gulp-shtml');
gulp.task('shtml', function(){
gulp.src('./wwwroot/*.shtml', {base: 'wwwroot'})
.pipe(shtml({
wwwroot: './wwwroot'
}))
.pipe(gulp.dest('build'));
});Options
###option.wwwroot Require "wwwroot" as a base dir to find file incs.
Issues
Fixed some buggy behaviour in other ssi plugins.
Both buffer and stream are supported.
Even though any type of file can be correctly parsed in theory, we strongly recommend to handle shtml/html only.
File extname won't be changed, use another plugin, gulp-rename for example instead.
To be continued...
