S
S
Sergey Goryachev2016-12-17 16:53:34
DLE
Sergey Goryachev, 2016-12-17 16:53:34

How can gulp-jade make files work with a different format?

How to force gulp-jade to save files not in .html but in .tpl format?
On DLE, this is exactly the format of the template files, how to make them friends, I can’t figure it out yet)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Serj-One, 2016-12-17
@webirus

What prevents to rename after compilation?
https://www.npmjs.com/package/gulp-rename
extname = ".tpl"

O
Oleg, 2016-12-17
@werty1001

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

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

    return 'app/build';

  })
);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question