A
A
Aleksandr2017-03-28 23:24:51
Pug
Aleksandr, 2017-03-28 23:24:51

How can Pug files be compiled into php?

Actually a subject.
I use gulp to build. How can I get the output php file, not html?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2017-03-28
@Sashjkeee

gulp.src( '*.pug' )
  .pipe( pug() )
  .pipe( gulp.dest(function(file) {

    file.basename = file.basename.split('.')[0] + '.php';

    return 'app/build';

  })
);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question