Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 11, 2019
1 parent 2aee2da commit 83b1ecd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ class Ora {
if (i > 0) {
this.stream.moveCursor(0, -1);
}

this.stream.clearLine();
this.stream.cursorTo(this.indent);
}

this.linesToClear = 0;

return this;
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
"idle"
],
"dependencies": {
"chalk": "^2.3.1",
"chalk": "^2.4.2",
"cli-cursor": "^2.1.0",
"cli-spinners": "^1.1.0",
"cli-spinners": "^1.3.1",
"log-symbols": "^2.2.0",
"strip-ansi": "^5.0.0",
"wcwidth": "^1.0.1"
},
"devDependencies": {
"ava": "^1.0.0-rc.2",
"ava": "^1.2.1",
"get-stream": "^4.1.0",
"xo": "^0.23.0"
"xo": "^0.24.0"
}
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Or an object like:

```js
{
interval: 80, // optional
interval: 80, // Optional
frames: ['-', '+', '-']
}
```
Expand Down Expand Up @@ -99,7 +99,7 @@ Spinners provide their own recommended interval, so you don't really need to spe

##### stream

Type: `WritableStream`<br>
Type: `stream.Writable`<br>
Default: `process.stderr`

Stream to write the output.
Expand Down
2 changes: 2 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,11 @@ test('erases wrapped lines', t => {
stream.clearLine = () => {
clearedLines++;
};

stream.moveCursor = (dx, dy) => {
cursorAtRow += dy;
};

const reset = () => {
clearedLines = 0;
cursorAtRow = 0;
Expand Down

0 comments on commit 83b1ecd

Please sign in to comment.