Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 7, 2015
0 parents commit 7e6d983
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
@@ -0,0 +1,15 @@
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{package.json,*.yml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules
7 changes: 7 additions & 0 deletions .travis.yml
@@ -0,0 +1,7 @@
language: objective-c
install:
- brew install n
- n latest
script:
- npm install
- npm test
15 changes: 15 additions & 0 deletions cli.js
@@ -0,0 +1,15 @@
#!/usr/bin/env node
/* eslint-disable no-mixed-spaces-and-tabs */
'use strict';
const updateNotifier = require('update-notifier');
const meow = require('meow');
const emptyTrash = require('empty-trash');

const cli = meow(`
Usage
$ empty-trash
`);

updateNotifier({pkg: cli.pkg}).notify();

emptyTrash();
21 changes: 21 additions & 0 deletions license
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
49 changes: 49 additions & 0 deletions package.json
@@ -0,0 +1,49 @@
{
"name": "empty-trash-cli",
"version": "0.0.0",
"description": "Empty the trash",
"license": "MIT",
"repository": "sindresorhus/empty-trash-cli",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bin": {
"empty-trash": "cli.js"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"cli.js"
],
"keywords": [
"cli-app",
"cli",
"trash",
"recycle",
"file",
"files",
"dir",
"directory",
"directories",
"empty",
"clear",
"osx",
"windows",
"linux"
],
"dependencies": {
"empty-trash": "^2.0.0",
"meow": "^3.4.2",
"update-notifier": "^0.5.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
}
}
32 changes: 32 additions & 0 deletions readme.md
@@ -0,0 +1,32 @@
# empty-trash-cli [![Build Status](https://travis-ci.org/sindresorhus/empty-trash-cli.svg?branch=master)](https://travis-ci.org/sindresorhus/empty-trash-cli)

> Empty the [trash](http://en.wikipedia.org/wiki/Trash_(computing))
Works on OS X, Linux, and Windows.


## Install

```
$ npm install --global empty-trash-cli
```


## Usage

```
$ empty-trash --help
Usage
$ empty-trash
```


## Related

- [empty-trash](https://github.com/sindresorhus/empty-trash) - API for this module


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)
9 changes: 9 additions & 0 deletions test.js
@@ -0,0 +1,9 @@
import childProcess from 'child_process';
import test from 'ava';

test(t => {
childProcess.execFile('./cli.js', {cwd: __dirname}, err => {
t.ifError(err);
t.end();
});
});

0 comments on commit 7e6d983

Please sign in to comment.