Gulp plugins

Hi so when creating a workflow with gulp I can create
a dist folder that used for production, what is the purpose
of using the gulp clean:dist if its just going to delete the folder?

wouldnt I need that folder?

I may be a bit confused on this tutorial towards the end it talks about this.
I may need some clearing up on it. https://css-tricks.com/gulp-for-beginners/

If you change filenames or remove files from your src files and don’t clear your build directory then it will continue to grow with unused files.

1 Like

From the article itself

Since we’re generating files automatically, we’ll want to make sure that files that are no longer used don’t remain anywhere without us knowing.

Say in the app folder you have an index.html and an about.html page. You run gulp and those two files get copied into the dist folder. Later on you decide that you don’t need the about.html page after all. You delete it from you app but a copy remains on your dist folder. You could got and remove it yourself but imagine you have many of these files. What gulp clean:dist does is delete the dist folder,

Now Gulp will delete the dist folder for you whenever gulp clean:dist is run.

Also

Note: We don’t have to worry about deleting the dist/images folder because gulp-cache has already stored the caches of the images on your local system.

oh ok I see

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.