JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10385
  • Score
    100M100P100Q134019F

Delete files and folders.

Package Exports

  • delete

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (delete) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

delete NPM version

Delete files and folders.

Also see

  • del if you need globbing.
  • write for writing files to disk.

Install

Install with npm:

npm i delete --save-dev

Usage

var del = require('delete');

// delete files asynchronously
del('tmp/foo.md', function(err) {
  if (err) {throw err;}
});

// delete files synchronously
del.sync('tmp/foo.md');

options.force

An error is thrown if you try to delete files outside of the current working directory (cwd).

Override the default behavior:

del.sync('../foo.md', {force: true});

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on June 28, 2014.