Last active
January 8, 2016 18:16
-
-
Save yocontra/f08afd78f0ef4c6abaa3 to your computer and use it in GitHub Desktop.
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
// removes all instances of node and npm from your computer | |
var fs = require('fs'); | |
var path = require('path'); | |
var walk = require('fs-walk'); | |
var wipeOut = ['node', 'npm']; | |
function sanicGoFast(p, cb){ | |
walk.files(p, function(dir, file, stat, next) { | |
if (wipeOut.indexOf(path.basename(file) === -1) return next(); | |
fs.unlink(path.join(dir, file), next); | |
}, cb); | |
} | |
console.log('Making your system great again...'); | |
sanicGoFast('/', function(err){ | |
if (err) return console.error(err); | |
console.log('Done'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment