gulp-preprocess-file
A Gulp plugin for Preprocess
Preprocess HTML, JavaScript, and other files with directives based off custom or ENV configuration
Usage
Install
$ npm install --save-dev gulp-preprocess-file
html examples
Gulpfile
var preprocess = ; gulp
html file
<!-- @echo title --><!-- @include ./text.html --> <!-- @if NODE_ENV!='production' --><!-- @endif --><!-- @if NODE_ENV='production' --><!-- @endif -->
Javascript/css examples
Gulpfile
var preprocess = ; gulp
test.js file
var ENV = '/* @echo NODE_ENV */' || 'development' /* @if NODE_ENV='production' **console.log('production')/* @endif */ // @if NODE_ENV='production'console// @endif
more: preprocess#configuration
API
context
Type: Object
more: preprocess#context
options
Type: Object
more: preprocess#options
API
License
gulp-preprocess-file
Based on Preprocess package
MIT © Mervin