Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ruyadorno/clean-dir
Command line util to clean a directory
https://github.com/ruyadorno/clean-dir
clean clean-dir cli command-line javascript js nodejs npm trash unix
Last synced: 11 days ago
JSON representation
Command line util to clean a directory
- Host: GitHub
- URL: https://github.com/ruyadorno/clean-dir
- Owner: ruyadorno
- Created: 2015-02-09T02:45:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-02-09T03:26:45.000Z (over 9 years ago)
- Last Synced: 2024-10-17T03:15:03.407Z (21 days ago)
- Topics: clean, clean-dir, cli, command-line, javascript, js, nodejs, npm, trash, unix
- Language: JavaScript
- Size: 184 KB
- Stars: 10
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cleandir
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
> Command line util to safely clean a directory
## About
This small command line tool uses [trash][trash-url] to safely clean the current working directory or the directory specified.
## Install
```sh
$ npm install -g clean-dir
```## Usage
### Command-line
Cleans up the current working directory:
```sh
$ cleandir
```Cleans a given directory:
```sh
$ cleandir ~/path-to-clean
```Displays the help message:
```sh
$ cleandir --help
```### Programmatic API
```js
var cleandir = require('clean-dir');cleandir('~/path-to-clean', function (err) {});
```## License
MIT © [Ruy Adorno](http://ruyadorno.com/)
[npm-url]: https://npmjs.org/package/clean-dir
[npm-image]: https://badge.fury.io/js/clean-dir.svg
[travis-url]: https://travis-ci.org/ruyadorno/clean-dir
[travis-image]: https://travis-ci.org/ruyadorno/clean-dir.svg?branch=master
[trash-url]: https://www.npmjs.com/package/trash