gulp-eco
Gulp plugin to compile eco.js template engine
Install
Install with npm
npm install --save-dev gulp-eco
Example
js
var gulp = ;var eco = ; gulp; gulp;
API
eco(options)
options.namespace
Type: String
Default: JST
define your own namespace to access the templates:
access templates via:
windowECO"template_name"name: 'Manfred'
options.basePath
Type: String
Default: ``
eco compiles every template file into a function, which you can call with:
windowJST"template_name"name: 'Manfred'
The template_name
depends is the absolute path to the file. E.g.
/var/www/app/templates/users/users.jst.eco
By passing basePath: 'app/templates'
you can strip the template_name
to
users/users.jst
License
MIT © Kalle Saas kalle@easypep.de