gulp-ejs-precompiler

    0.2.0 • Public • Published

    gulp-ejs-precompiler

    A plugin for gulp that precompiles ejs templates

    var ejs = require('gulp-ejs-precompiler');
    var concat = require('gulp-concat');
     
    gulp.task('ejs', function() {
        return gulp.src(paths.browser.templatesEJS)
            .pipe(plumber())
            .pipe(ejs({
                compileDebug: true,
                client: true
            }))
            .pipe(concat(pkg.name + /*'-' + pkg.version +*/ '.templates.js'))
            .pipe(insert.prepend('window.templates = {};'+"\n"))
            .pipe(gulp.dest(paths.dist));
    });

    Install

    npm i gulp-ejs-precompiler

    DownloadsWeekly Downloads

    6

    Version

    0.2.0

    License

    MIT

    Last publish

    Collaborators

    • avatar