The dependencies and build process are described in the gruntfiles.js and packages.json files. It makes sense to move the clean up to these files too.