I
I
ilya granovskyy2021-02-13 12:43:37
gulp.js
ilya granovskyy, 2021-02-13 12:43:37

Why doesn't Gulp create an img folder in the dist folder?

https://codepen.io/ilyaaa/pen/qBadRNp?editors=1010 .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
ploskost, 2021-02-25
@ploskost

Because the images function is not called by any of the tasks.
It is possible like this:

let build = series(clean, parallel(js, css, html), images);

Either like this:
let build = series(clean, parallel(js, css, html, images));

In the second case, an error may occur in the browser: "Cannot GET /", when running the default/watch task, in this case, you can move the html task forward:
let build = series(clean, html, parallel(js, css, images));
let watch = parallel(build, watchFiles, browserSync);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question