mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-21 05:20:19 +08:00
Remove build directory without ending up in trash
This is frustrating with shells like `fish` that track directory moves
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user