Answer the question
In order to leave comments, you need to log in
How to clear a folder not completely, but only those files that gulp will create?
It's considered good practice to clear the destination folder before building, and that's pretty clear.
But for example, the situation is when jade compiles only changed files (using gulp-changed), and accordingly creates html for these changed files.
And before this process, I want to clear only these files, without touching the files that will not be rebuilt.
Or, for example, the situation when the jade file was deleted, how to delete acc. html file?? Are there any plugins for this?
Answer the question
In order to leave comments, you need to log in
What's wrong with deleting everything? You still have the source code, and Galp collects them in milliseconds.
There is an option to allocate a folder for rendered Jade, and then clean them up using:
gulp-clean
The second option is to make a self-written plugin for gulp that checks all html files and if it does not find their .jade analogue, then it will be deleted
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question