@holz/ansi-terminal-backend 0.5.0 → 0.6.0

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.
Files changed (2) hide show
  1. package/README.md +28 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # `@holz/ansi-terminal-backend`
2
+
3
+ Pretty-print logs to the terminal.
4
+
5
+ <img alt="Screenshot of logs printed to the terminal" src="https://user-images.githubusercontent.com/10053423/222926680-0a12da0c-5ff2-40a1-8759-5dca72eb89c3.png" width="600" />
6
+
7
+ ## Usage
8
+
9
+ ```typescript
10
+ import { createAnsiTerminalBackend } from '@holz/ansi-terminal-backend';
11
+
12
+ const logger = createLogger(createAnsiTerminalBackend());
13
+ ```
14
+
15
+ > **Note**
16
+ > There is no way to disable colors. The output relies on colors to convey structure. To disable colors, use a different backend such as [`@holz/stream-backend`](https://github.com/PsychoLlama/holz/tree/main/packages/holz-stream-backend).
17
+
18
+ ## Options
19
+
20
+ ```typescript
21
+ createAnsiTerminalBackend({
22
+ /**
23
+ * By default it prints to the global console, but you can override it.
24
+ * See: https://nodejs.org/api/console.html#new-consoleoptions
25
+ */
26
+ console: new Console(custom.stdout, custom.stderr),
27
+ });
28
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holz/ansi-terminal-backend",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "An ANSI terminal backend for Holz",
5
5
  "type": "module",
6
6
  "main": "./dist/holz-ansi-terminal-backend.cjs",
@@ -38,10 +38,10 @@
38
38
  "test:types": "tsc"
39
39
  },
40
40
  "peerDependencies": {
41
- "@holz/core": "^0.5.0"
41
+ "@holz/core": "^0.6.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@holz/core": "^0.5.0",
44
+ "@holz/core": "^0.6.0",
45
45
  "@types/node": "^18.14.0",
46
46
  "@vitest/coverage-c8": "^0.28.5",
47
47
  "typescript": "^4.9.5",