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
Post a Comment