JSPM

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

Delete files and folders and any intermediate directories if they exist (sync and async).

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 Build Status

Delete files and folders and any intermediate directories if they exist (sync and async).

Install

Install with npm

$ npm i delete --save

Usage

var del = require('delete');

// async
del('tmp/foo.md', function(err) {
  if (err) console.log(err);
});

// sync
del.sync('tmp/foo.md');

// promise
del.promise('foo/bar/baz.txt')
  .then(function() {
    //=> do stuff
  });

options.force

(The force option was inspired by [grunt].)

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});
  • copy: Copy files or directories using globs.
  • export-files: node.js utility for exporting a directory of files as modules.
  • glob-fs: file globbing for node.js. speedy and powerful alternative to node-glob.
  • micromatch: Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… more
  • read-data: Read JSON or YAML files.
  • write: Write files to disk, creating intermediate directories if they don't exist.
  • write-yaml: Write YAML. Converts JSON to YAML writes it to the specified file.
  • write-json: Write a JSON to file disk, also creates directories in the dest path if they… more

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on July 09, 2015.