Answer the question
In order to leave comments, you need to log in
Is it possible to compile .pug to .php with Gulp?
If so, how? Should this be done somehow?)) Otherwise, pug turns out to be somehow of little use ...
Answer the question
In order to leave comments, you need to log in
var pug = require('gulp-pug');
gulp.task('pug', function() {
return gulp.src('app/pug/**/*.pug')
.pipe( pug({pretty: true}) )
.pipe(rename(function (path) {
path.extname = ".php"
}))
.pipe(gulp.dest('app/'))
.pipe(browserSync.reload({stream: true}));
});
pug is a regular jade, just a different name, renamed due to a complaint from another brand.
As a result, all the same chips that jade had were available to him.
I currently have a bunch of gulp-pug and gulp-jade-php plugins (while it works).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question