How to use the rimraf function in rimraf

To help you get started, we’ve selected a few rimraf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elastic / kibana / x-pack / legacy / plugins / code / server / __tests__ / lsp_indexer.ts View on Github external
return new Promise(resolve => {
    if (!fs.existsSync(p)) {
      rimraf(p, error => {
        Git.Clone.clone(url, p, opts).then(repo => {
          resolve(repo);
        });
      });
    } else {
      resolve();
    }
  });
}
github elastic / kibana / x-pack / plugins / code / server / __tests__ / lsp_incremental_indexer.ts View on Github external
return new Promise(resolve => {
    rimraf(serverOptions.workspacePath, resolve);
  });
}
github galvez / vue-stator / test / utils / index.js View on Github external
return new Promise((resolve, reject) => {
    farmir(dir, (err) => {
      if (err) {
        reject(err)
      }

      resolve()
    })
  })
}
github nRewik / react-railgun / source / server / server.dev.js View on Github external
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}`)
  })
}
github SpareBank1 / designsystem / packages / ffe-icons-react / src / clean.js View on Github external
import iconlist from './../iconlist.json';
import rimraf from 'rimraf';

rimraf('temp', {}, () => {});
rimraf('jsx', {}, () => {});
iconlist.map(icon => rimraf(`${icon}.js`, {}, () => {}));
rimraf('ffe-icons-react.js', {}, () => {});
github microsoft / fluent-ui-react / build / gulp / tasks / perf.ts View on Github external
task('perf:clean', cb => {
  rimraf(paths.perfDist(), cb)
})
github facebookarchive / flow-language-server / server / src / pkg / commons-node / fsPromise.js View on Github external
return new Promise((resolve, reject) => {
    rimraf(filePath, (err, result) => {
      if (err == null) {
        resolve(result);
      } else {
        reject(err);
      }
    });
  });
}
github jakobwesthoff / palavra / Gulpfile.babel.js View on Github external
gulp.task('clean', next => {
  rimraf('./Distribution', next);
});
github secret-tech / frontend-ico-dashboard / tools / removeDemo.js View on Github external
function removePath(path, callback) {
  rimraf(path, (error) => {
    if (error) throw new Error(error);
    callback();
  });
}
github bitovi / landscaper / src / cli / execute.js View on Github external
return new Promise((resolve, reject) => {
          rimraf(directory, error => {
            if (error) {
              const isRemovedAlready = error.code === 'ENOENT'
              if (isRemovedAlready) {
                return resolve()
              }
              return reject(error)
            }
            resolve()
          })
        })
      }

rimraf

A deep deletion module for node (like `rm -rf`)

ISC
Latest version published 4 months ago

Package Health Score

83 / 100
Full package analysis