D
D
Denis Bukreev2016-10-11 16:24:55
Building projects
Denis Bukreev, 2016-10-11 16:24:55

How to properly replace file extension in Gulp picker?

Such a task: when building, I need the files to change their extension from .html to .php
How to do this correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
�
Олег, 2016-10-11
@denisbookreev

gulp-rename

var rename = require("gulp-rename");

gulp.src("./*.html")
  .pipe(rename(function (path) {
    path.extname = ".php"
  }))
  .pipe(gulp.dest("./dist"));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question