Plato on Github
Report Home
template/templatize.js
Maintainability
80.02
Lines of code
24
Difficulty
7.80
Estimated Errors
0.17
Function weight
By Complexity
By SLOC
'use strict'; var packagePath = __dirname + '/../../package.json'; var gulp = require('gulp'); var path = require('path'); var $ = require('gulp-load-plugins')({config: path.normalize(packagePath)}); var config = { name: 'template:templatize', callback: callback }; module.exports = config; ///////////////////////////// /*jshint unused:false*/ function callback(settings, done) { return gulp.src(settings.src) .pipe($.template(settings.vars, {interpolate: /{{([\s\S]+?)}}/g })) .pipe($.rename(settings.filename)) .pipe(gulp.dest(settings.dest)); }