terminal-richjs 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
## 📦 Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npm install richjs
|
|
12
|
+
npm install terminal-richjs
|
|
13
13
|
# or
|
|
14
|
-
yarn add richjs
|
|
14
|
+
yarn add terminal-richjs
|
|
15
15
|
# or
|
|
16
|
-
pnpm add richjs
|
|
16
|
+
pnpm add terminal-richjs
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## 🚀 Quick Start
|
|
@@ -21,7 +21,7 @@ pnpm add richjs
|
|
|
21
21
|
The easiest way to get started is to import `Console` and print some text.
|
|
22
22
|
|
|
23
23
|
```typescript
|
|
24
|
-
import { Console } from 'richjs';
|
|
24
|
+
import { Console } from 'terminal-richjs';
|
|
25
25
|
|
|
26
26
|
const console = new Console();
|
|
27
27
|
|
|
@@ -68,7 +68,7 @@ console.print('[on #282a36]Dark background[/on #282a36]');
|
|
|
68
68
|
## 📊 Tables
|
|
69
69
|
|
|
70
70
|
```typescript
|
|
71
|
-
import { Console, Table } from 'richjs';
|
|
71
|
+
import { Console, Table } from 'terminal-richjs';
|
|
72
72
|
|
|
73
73
|
const table = new Table({
|
|
74
74
|
title: 'Star Wars Movies',
|
|
@@ -105,7 +105,7 @@ new Console().print(table);
|
|
|
105
105
|
## 💻 Syntax Highlighting
|
|
106
106
|
|
|
107
107
|
```typescript
|
|
108
|
-
import { Console, Syntax, Panel } from 'richjs';
|
|
108
|
+
import { Console, Syntax, Panel } from 'terminal-richjs';
|
|
109
109
|
|
|
110
110
|
const code = `function fibonacci(n: number): number {
|
|
111
111
|
if (n <= 1) return n;
|
|
@@ -131,7 +131,7 @@ new Console().print(
|
|
|
131
131
|
## 🌳 Tree Views
|
|
132
132
|
|
|
133
133
|
```typescript
|
|
134
|
-
import { Console, Tree } from 'richjs';
|
|
134
|
+
import { Console, Tree } from 'terminal-richjs';
|
|
135
135
|
|
|
136
136
|
const tree = new Tree('📁 project');
|
|
137
137
|
const src = tree.add('📁 src');
|
|
@@ -157,7 +157,7 @@ new Console().print(tree);
|
|
|
157
157
|
## 📦 Panels
|
|
158
158
|
|
|
159
159
|
```typescript
|
|
160
|
-
import { Console, Panel } from 'richjs';
|
|
160
|
+
import { Console, Panel } from 'terminal-richjs';
|
|
161
161
|
|
|
162
162
|
new Console().print(
|
|
163
163
|
new Panel('Hello, World!', {
|
|
@@ -176,7 +176,7 @@ new Console().print(
|
|
|
176
176
|
Beautiful error traces with syntax-highlighted code:
|
|
177
177
|
|
|
178
178
|
```typescript
|
|
179
|
-
import { installTracebackHandler } from 'richjs';
|
|
179
|
+
import { installTracebackHandler } from 'terminal-richjs';
|
|
180
180
|
|
|
181
181
|
// Install globally for all uncaught exceptions
|
|
182
182
|
installTracebackHandler({
|
|
@@ -186,7 +186,7 @@ installTracebackHandler({
|
|
|
186
186
|
});
|
|
187
187
|
|
|
188
188
|
// Or render manually
|
|
189
|
-
import { Console, Traceback } from 'richjs';
|
|
189
|
+
import { Console, Traceback } from 'terminal-richjs';
|
|
190
190
|
|
|
191
191
|
try {
|
|
192
192
|
throw new Error('Something went wrong');
|
|
@@ -198,7 +198,7 @@ try {
|
|
|
198
198
|
## 📈 Progress Bars
|
|
199
199
|
|
|
200
200
|
```typescript
|
|
201
|
-
import { Console, Progress, ProgressBar } from 'richjs';
|
|
201
|
+
import { Console, Progress, ProgressBar } from 'terminal-richjs';
|
|
202
202
|
|
|
203
203
|
// Simple progress bar
|
|
204
204
|
const bar = new ProgressBar(100, 75, {
|