Edge.js(http://edge.adonisjs.com) template engine
npm install gulp-edgejs

sh
yarn add gulp-edgejs
`Usage
$3
`js
const gulp = require('gulp');
const gulpEdge = require('gulp-edgejs');gulp.task('edge', ()=>{
return gulp.src('./index.edge')
.pipe( gulpEdge() )
.pipe(gulp.dest('./build'));
});
`$3
`html
hello {{ name }}
`
`js
gulp.task('edge', ()=>{
return gulp.src('./index.edge')
.pipe( gulpEdge({ name: 'byungi' }) )
.pipe(gulp.dest('./build'));
});
`
output:
`html
hello byungi
`API
$3
Returns gulp transformer for edge.js compilation.#### data
Set the data values.
##### object
`js
gulp.src('./index.edge')
.pipe( gulpEdge({ name: 'byungi' }) )
`##### file
`js
return gulp.src('index.edge')
.pipe( gulpEdge('./data.json') )
`##### directory
If it is a
directory, set the data that matches the edge.js file name in the directory.`js
return gulp.src('edge/*.edge')
.pipe( gulpEdge('data/') )
`
edge/main.edge
`
hello {{ value }}
`
data/main.js
`js
export.value = 'world'
`
output:
`
hello world
`
#### options
##### ext
Output extension name. Default is html##### views
Directory for load other view files. (edge.js can load other view files with
@layout, @component keyword.)##### path
An alias for
views.##### globals
Add global function or variable.
##### tags
Add custom tags.
#### refresh
If this value is true, import new data from the path without cache. This is useful when in watch mode. Default is
false`.