Answer the question
In order to leave comments, you need to log in
How to properly build jade(pug) with gulp?
There is a gulp collector
//Компиляция jade
gulp.watch('source/jade/*.jade',function(jade_f) {
gulp.src(jade_f.path)
.pipe(pug({
}))
.pipe(rename(function (path) {
path.basename = "index";
path.extname = ".html"
}))
.pipe(gulp.dest('dist'));
});
html
head
body
footer
<html><head></head><body></body><footer></footer></html>
Answer the question
In order to leave comments, you need to log in
pretty: boolean | string
[Deprecated.] Adds whitespace to the resulting HTML to make it easier for a human to read using ' ' as indentation. If a string is specified, that will be used as indentation instead (eg '\t'). We strongly recommend against using this option. Too often, it creates subtle bugs in your templates because of the way it alters the interpretation and rendering of whitespace, and so this feature is going to be removed. defaults to false.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question