Remove build directory without ending up in trash

This is frustrating with shells like `fish` that track directory moves
This commit is contained in:
Dan Abramov
2016-07-26 22:30:42 +01:00
parent 895cfaf9bb
commit 9b6e87c6cb

View File

@@ -14,7 +14,9 @@ var webpack = require('webpack');
var config = require('../config/webpack.config.prod');
var paths = require('../config/paths');
rimrafSync(paths.appBuild);
// Remove all content but keep the directory so that
// if you're in it, you don't end up in Trash
rimrafSync(paths.appBuild + '/*');
webpack(config).run(function(err, stats) {
if (err) {