html - How to configure npm pug-php-filter with gulp? -


i cannot figure out how configure pug-php-filter(https://www.npmjs.com/package/pug-php-filter) gulp can use php in pug file.
plz me this.

var rename = require('gulp-rename'); var pug = require('gulp-pug'),     pugphpfilter = require('pug-php-filter');  gulp.task('pug', function() {   return gulp.src('./_pugfiles/**/*.pug')    .pipe( pug({        pretty: "\t",        filters: {         php: pugphpfilter     } }) )    .pipe(rename(function (path) {       path.extname = ".php"     }))   .pipe(gulp.dest('./site'));  }); 

Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -