Skip to content

Commit

Permalink
Require Node.js 8
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 28, 2019
1 parent 3537e7a commit f064996
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{package.json,*.yml}]
[*.yml]
indent_style = space
indent_size = 2
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* text=auto
*.js text eol=lf
* text=auto eol=lf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
yarn.lock
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
os: osx
language: node_js
node_js:
- '6'
- '4'
- '12'
- '10'
- '8'
6 changes: 3 additions & 3 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ meow(`
if (process.stdin.isTTY || process.env.STDIN === '0') {
console.log(clipboardy.readSync());
} else {
getStdin().then(stdin => {
clipboardy.writeSync(stdin);
});
(async () => {
clipboardy.writeSync(await getStdin());
})();
}
20 changes: 4 additions & 16 deletions license
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
The MIT License (MIT)
MIT License

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:
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 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.
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.
97 changes: 47 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,49 @@
{
"name": "clipboard-cli",
"version": "1.1.0",
"description": "Access the system clipboard (copy/paste)",
"license": "MIT",
"repository": "sindresorhus/clipboard-cli",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bin": {
"clipboard": "cli.js"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"cli.js"
],
"keywords": [
"cli-app",
"cli",
"clipboard",
"copy",
"paste",
"copy-paste",
"pasteboard",
"read",
"write",
"pbcopy",
"clip",
"xclip",
"xsel"
],
"dependencies": {
"clipboardy": "^1.0.0",
"get-stdin": "^5.0.1",
"meow": "^3.7.0"
},
"devDependencies": {
"ava": "*",
"execa": "^0.6.1",
"xo": "*"
},
"xo": {
"esnext": true
}
"name": "clipboard-cli",
"version": "1.1.0",
"description": "Access the system clipboard (copy/paste)",
"license": "MIT",
"repository": "sindresorhus/clipboard-cli",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bin": {
"clipboard": "cli.js"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"cli.js"
],
"keywords": [
"cli-app",
"cli",
"clipboard",
"copy",
"paste",
"copy-paste",
"pasteboard",
"read",
"write",
"pbcopy",
"clip",
"xclip",
"xsel"
],
"dependencies": {
"clipboardy": "^2.0.0",
"get-stdin": "^7.0.0",
"meow": "^5.0.0"
},
"devDependencies": {
"ava": "^1.4.1",
"execa": "^1.0.0",
"xo": "^0.24.0"
}
}
7 changes: 1 addition & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Access the system clipboard (copy/paste) - cross-platform
Supports: macOS, Windows, Linux, OpenBSD, FreeBSD, Android with [Termux](https://termux.com/).
Supports: macOS, Windows, Linux, OpenBSD, FreeBSD, Android with [Termux](https://termux.com).


## Install
Expand Down Expand Up @@ -32,8 +32,3 @@ Run it with `$ cb` instead by adding `alias cb=clipboard` to your `.zshrc`/`.bas
## Related

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


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)
8 changes: 6 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import test from 'ava';
import execa from 'execa';

test(async t => {
test('main', async t => {
const input = '🦄';
await execa('./cli.js', {input});

t.is(await execa.stdout('./cli.js', {
env: Object.assign(process.env, {STDIN: 0})
env: {
...process.env,
STDIN: 0
}
}), input);
});

0 comments on commit f064996

Please sign in to comment.