Skip to content

Commit

Permalink
chore: add example for readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Apr 11, 2023
1 parent 817626f commit 2bb5813
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions examples/sample.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { consola } from "../src";

async function main() {
consola.info("Using consola 3.0.0");
consola.start("Building project...");
consola.warn("A new version of consola is available: 3.0.1");
consola.success("Project built!");
consola.error(new Error("This is an example error. Everything is fine!"));
await consola.prompt("Deploy to the production?", {
type: "confirm",
});
}

main();

0 comments on commit 2bb5813

Please sign in to comment.