From 21c31e50936c1979ea35b753b7823fbcb07f25f0 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Wed, 18 Dec 2019 18:28:53 +0100 Subject: [PATCH] Meta tweaks --- package.json | 9 +++++---- readme.md | 5 ----- test.js | 3 ++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 81721d1..1a587b7 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Reliably get the terminal window size (columns & rows)", "license": "MIT", "repository": "sindresorhus/term-size", + "funding": "https://github.com/sponsors/sindresorhus", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -34,9 +35,9 @@ "redirected" ], "devDependencies": { - "ava": "^1.4.1", - "execa": "^1.0.0", - "tsd": "^0.7.3", - "xo": "^0.24.0" + "ava": "^2.4.0", + "execa": "^3.4.0", + "tsd": "^0.11.0", + "xo": "^0.25.3" } } diff --git a/readme.md b/readme.md index 2fd9496..98cbe38 100644 --- a/readme.md +++ b/readme.md @@ -6,14 +6,12 @@ Because [`process.stdout.columns`](https://nodejs.org/api/tty.html#tty_writestre Confirmed working on macOS, Linux, and Windows. - ## Install ``` $ npm install term-size ``` - ## Usage ```js @@ -23,19 +21,16 @@ termSize(); //=> {columns: 143, rows: 24} ``` - ## API ### termSize() Returns an `object` with `columns` and `rows` properties. - ## Related - [term-size-cli](https://github.com/sindresorhus/term-size-cli) - CLI for this module - ---
diff --git a/test.js b/test.js index 6fbe049..6a10b9e 100644 --- a/test.js +++ b/test.js @@ -10,7 +10,8 @@ test('main', t => { }); test('child', async t => { - const [columns, rows] = (await execa.stdout('node', ['fixture.js'])).split('\n').map(Number); + const {stdout} = await execa('node', ['fixture.js']); + const [columns, rows] = stdout.split('\n').map(Number); console.log('Child size:', {columns, rows}); t.true(parseInt(columns, 10) > 0); t.true(parseInt(rows, 10) > 0);