@holz/console-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 +27 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # `@holz/console-backend`
2
+
3
+ Pretty-print logs to the browser console.
4
+
5
+ <img alt="Screenshot of logs printed to the browser console" src="https://user-images.githubusercontent.com/10053423/222927532-2925b0a3-9494-4de7-b328-917ceb8607b0.png" width="600" />
6
+
7
+ ## Usage
8
+
9
+ ```typescript
10
+ import { createConsoleBackend } from '@holz/console-backend';
11
+
12
+ const logger = createLogger(createConsoleBackend());
13
+ ```
14
+
15
+ > **Note**
16
+ > This is fine-tuned for an interactive browser console. If you want pretty-printed logs in Node or Deno, try [`@holz/ansi-terminal-backend`](https://github.com/PsychoLlama/holz/tree/main/packages/holz-ansi-terminal-backend) instead.
17
+
18
+ ## Options
19
+
20
+ ```typescript
21
+ createConsoleBackend({
22
+ /**
23
+ * By default it prints to the global console, but you can override it.
24
+ */
25
+ console: typeof console,
26
+ });
27
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holz/console-backend",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "A console backend for Holz",
5
5
  "type": "module",
6
6
  "main": "./dist/holz-console-backend.cjs",
@@ -39,7 +39,7 @@
39
39
  "test:types": "tsc"
40
40
  },
41
41
  "devDependencies": {
42
- "@holz/core": "^0.5.0",
42
+ "@holz/core": "^0.6.0",
43
43
  "@types/node": "^18.14.0",
44
44
  "@vitest/coverage-c8": "^0.28.5",
45
45
  "typescript": "^4.9.5",