Skip to content

Commit

Permalink
chore: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 28, 2023
1 parent da557ac commit e07e3ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/basic.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BasicReporter } from "../src";
import { BasicReporter } from "../src/reporters";
import { reporterDemo } from "./utils";

reporterDemo(new BasicReporter({}));
2 changes: 1 addition & 1 deletion examples/fancy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FancyReporter } from "../src";
import { FancyReporter } from "../src/reporters";
import { reporterDemo } from "./utils";

reporterDemo(new FancyReporter({}));
7 changes: 4 additions & 3 deletions examples/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Consola, FancyReporter } from "../../src";
import { FancyReporter } from "../../src/reporters";
import { createConsola } from "../../src";
import { randomSentence } from "./sentence";

export function reporterDemo(reporter) {
const consola = new Consola({
const consola = createConsola({
level: 5,
reporters: [reporter],
});
Expand All @@ -25,6 +26,6 @@ export function reporterDemo(reporter) {
}
}

export const consola = new Consola({
export const consola = createConsola({
reporters: [new FancyReporter()],
});

0 comments on commit e07e3ab

Please sign in to comment.