Skip to content

Commit 9b6e87c

Browse files
committed
Remove build directory without ending up in trash
This is frustrating with shells like `fish` that track directory moves
1 parent 895cfaf commit 9b6e87c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/build.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ var webpack = require('webpack');
1414
var config = require('../config/webpack.config.prod');
1515
var paths = require('../config/paths');
1616

17-
rimrafSync(paths.appBuild);
17+
// Remove all content but keep the directory so that
18+
// if you're in it, you don't end up in Trash
19+
rimrafSync(paths.appBuild + '/*');
1820

1921
webpack(config).run(function(err, stats) {
2022
if (err) {

0 commit comments

Comments
 (0)