index.js 331 B

1234567891011121314151617
  1. 'use strict'
  2. const fs = require('graceful-fs')
  3. const u = require('universalify').fromCallback
  4. function remove (path, callback) {
  5. fs.rm(path, { recursive: true, force: true }, callback)
  6. }
  7. function removeSync (path) {
  8. fs.rmSync(path, { recursive: true, force: true })
  9. }
  10. module.exports = {
  11. remove: u(remove),
  12. removeSync
  13. }