-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
238 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import fs from 'fs'; | ||
import { spawn, exec } from 'child_process'; | ||
import trash from 'trash'; | ||
|
||
fs.writeFileSync('reset.log', ''); | ||
|
||
// let results = []; | ||
const cleaningProcess = spawn('git', [ | ||
'clean', | ||
'-xdf', | ||
'-n', | ||
'--exclude=".vscode"', | ||
'--exclude=".idea"', | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Hypnosphi
Member
|
||
]); | ||
|
||
cleaningProcess.stdout.on('data', data => { | ||
if (data && data.toString()) { | ||
const l = data | ||
.toString() | ||
.split(/\n/) | ||
.forEach(i => { | ||
const [, uri] = i.match(/Would remove (.*)$/) || []; | ||
|
||
if (uri) { | ||
trash(uri); | ||
} | ||
}); | ||
} | ||
fs.appendFile('reset.log', data, err => { | ||
if (err) { | ||
throw err; | ||
} | ||
}); | ||
}); | ||
cleaningProcess.on('exit', code => { | ||
if (code === 0) { | ||
console.log('all went well, files are being trashed now'); | ||
} else { | ||
console.error(code); | ||
} | ||
}); |
Oops, something went wrong.
Looks like this argument doesn't get applied for some reason. I just ran
yarn bootstrap --reset
and lost my IDEA project =(