I use grunt-contrib-pug to compile my .pug files from src/ and distribute the corresponding .html files to dist/. Here is my pug-task config (written in .coffee):
compile:
options: pretty: false
files: [ {
expand: true
cwd: 'src/'
src: [ '**/*.pug', '!includes/**' ]
dest: 'dist/'
ext: '.html'
} ]
When I delete a .pug file from src/, is there any way to synchronize delete corresponding html files in dist/? I know you can use grunt-contrib-clean followed by compiling the pug files again, but this is not time efficient when working with a large codebase.