Tabnine Logo For Javascript
rimraf
Code IndexAdd Tabnine to your IDE (free)

How to use rimraf

Best JavaScript code snippets using rimraf(Showing top 15 results out of 2,088)

origin: GoogleChromeLabs/ndb

(async function main() {
 const outFolder = path.join(__dirname, '.local-frontend');
 await new Promise(resolve => rimraf(outFolder, resolve));

 return buildApp(
   ['ndb', 'heap_snapshot_worker', 'formatter_worker'], [
    path.join(__dirname, 'front_end'),
    DEVTOOLS_DIR,
    path.join(__dirname, 'node_modules'),
   ], outFolder,
   minifyJS);
})();
origin: sx1989827/DOClever

archive.on('error', function(err) {
        rm(path.join(con.filePath,"temp",name),{},function (err) {

        });
        throw err;
      });
origin: clinicjs/node-clinic

function clean (dir, cb) {
 fs.readdir(dir, function (err, entries) {
  if (err) return cb(err)

  const pathsToRemove = entries
   .filter(entry => /^(\.clinic|\d+\.clinic-\w+(\.html)?|node_trace\.\d+\.log)$/.test(entry))
   .map(entry => path.join(dir, entry))

  async.eachSeries(
   pathsToRemove,
   (entry, next) => rimraf(entry, { disableGlob: true }, next),
   cb
  )
 })
}
origin: sx1989827/DOClever

output.on('close', function() {
        rm(path.join(con.filePath,"temp",name),{},function (err) {

        });
        res.download(pathName,req.obj.name+".zip",function (err) {
          if(!err)
          {
            obj.removeAsync();
            fs.access(pathName,fs.constants.F_OK,function (err) {
              if(!err)
              {
                fs.unlink(pathName);
              }
            })
          }
        });
      });
origin: Flood-UI/flood

rimraf(file, {disableGlob: true}, error => {
 if (error) {
  console.error(`Error deleting file: ${file}\n${error}`);
origin: clinicjs/node-clinic

 rimraf.sync(tempdir)
})
origin: coryhouse/react-slingshot

 rimraf('./tools/setup', error => {
  if (error) throw new Error(error);
 });
rimraf('.git', error => {
 if (error) throw new Error(error);
 console.log(chalkSuccess('Original Git repository removed.\n'));
origin: clinicjs/node-clinic

 }, { private: true })
} finally {
 rimraf.sync(outputs.data)
 rimraf.sync(outputs.visualizer)
origin: i5ting/koa-generator

function cleanup(dir, callback) {
 if (typeof dir === 'function') {
  callback = dir;
  dir = tempDir;
 }

 rimraf(tempDir, function (err) {
  callback(err);
 });
}
origin: richardgirges/express-fileupload

const clearDir = (dir) => {
 if (fs.existsSync(dir)) rimraf.sync(dir);
 fs.mkdirSync(dir, { recursive: true });
}
origin: LFB/nodejs-koa-blog

rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
 if (err) throw err
 webpack(webpackConfig, (err, stats) => {
  spinner.stop()
  if (err) throw err
  process.stdout.write(stats.toString({
   colors: true,
   modules: false,
   children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
   chunks: false,
   chunkModules: false
  }) + '\n\n')

  if (stats.hasErrors()) {
   console.log(chalk.red('  Build failed with errors.\n'))
   process.exit(1)
  }

  console.log(chalk.cyan('  Build complete.\n'))
  console.log(chalk.yellow(
   '  Tip: built files are meant to be served over an HTTP server.\n' +
   '  Opening index.html over file:// won\'t work.\n'
  ))
 })
})
origin: binci/binci

afterEach((done) => {
 process.cwd.restore()
 rimraf(`${__dirname}/tmp`, done)
})
describe('load', () => {
origin: welkinwong/nodercms

var fileFolder = '../../public/media/' + moment(results.removeMedium.date).format('YYYYMM') + '/' + results.removeMedium._id;
rimraf(path.join(__dirname, fileFolder), function (err) {
 if (err) err.type = 'system';
origin: DimiMikadze/create-social-network

rimraf.sync(`${projectName}/.git`);
rimraf.sync(`${projectName}/lib`);
rimraf.sync(`${projectName}/LICENSE.md`);
rimraf.sync(`${projectName}/CONTRIBUTING.md`);
rimraf.sync(`${projectName}/.prettierrc`);
rimraf.sync(`${projectName}/.github`);
rimraf.sync(`${projectName}/CODE_OF_CONDUCT.md`);
origin: pkwenda/Blog

rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
 if (err) throw err
 webpack(webpackConfig, (err, stats) => {
  spinner.stop()
  if (err) throw err
  process.stdout.write(stats.toString({
   colors: true,
   modules: false,
   children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
   chunks: false,
   chunkModules: false
  }) + '\n\n')

  if (stats.hasErrors()) {
   console.log(chalk.red('  Build failed with errors.\n'))
   process.exit(1)
  }

  console.log(chalk.cyan('  Build complete.\n'))
  console.log(chalk.yellow(
   '  Tip: built files are meant to be served over an HTTP server.\n' +
   '  Opening index.html over file:// won\'t work.\n'
  ))
 })
})
rimraf(npm)

JSDoc

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

Most used rimraf functions

  • rm
  • rimraf
  • sync
  • rimrafSync
  • rmrf
  • deleteDir

Popular in JavaScript

  • js-yaml
    YAML 1.2 parser and serializer
  • moment
    Parse, validate, manipulate, and display dates
  • mocha
    simple, flexible, fun test framework
  • minimatch
    a glob matcher in javascript
  • glob
    a little globber
  • readable-stream
    Streams3, a user-land copy of the stream library from Node.js
  • superagent
    elegant & feature rich browser / node HTTP with a fluent API
  • node-fetch
    A light-weight module that brings window.fetch to node.js
  • request
    Simplified HTTP request client.
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now