Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise(resolve => {
if (!fs.existsSync(p)) {
rimraf(p, error => {
Git.Clone.clone(url, p, opts).then(repo => {
resolve(repo);
});
});
} else {
resolve();
}
});
}
return new Promise(resolve => {
rimraf(serverOptions.workspacePath, resolve);
});
}
return new Promise((resolve, reject) => {
farmir(dir, (err) => {
if (err) {
reject(err)
}
resolve()
})
})
}
const remove = sourcePath => {
const filePath = sourcePath.split('/').slice(1).join('/')
const buildPath = require('path').join('build', filePath)
rimraf(buildPath, require('fs'), error => {
if (error) { console.log(error) }
clearCache()
console.log(`deleted ${filePath}`)
})
}
import iconlist from './../iconlist.json';
import rimraf from 'rimraf';
rimraf('temp', {}, () => {});
rimraf('jsx', {}, () => {});
iconlist.map(icon => rimraf(`${icon}.js`, {}, () => {}));
rimraf('ffe-icons-react.js', {}, () => {});
task('perf:clean', cb => {
rimraf(paths.perfDist(), cb)
})
return new Promise((resolve, reject) => {
rimraf(filePath, (err, result) => {
if (err == null) {
resolve(result);
} else {
reject(err);
}
});
});
}
gulp.task('clean', next => {
rimraf('./Distribution', next);
});
function removePath(path, callback) {
rimraf(path, (error) => {
if (error) throw new Error(error);
callback();
});
}
return new Promise((resolve, reject) => {
rimraf(directory, error => {
if (error) {
const isRemovedAlready = error.code === 'ENOENT'
if (isRemovedAlready) {
return resolve()
}
return reject(error)
}
resolve()
})
})
}