summaryrefslogtreecommitdiff
path: root/std/examples/colors.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/examples/colors.ts')
-rw-r--r--std/examples/colors.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/std/examples/colors.ts b/std/examples/colors.ts
index e02c90746..c4cab7e78 100644
--- a/std/examples/colors.ts
+++ b/std/examples/colors.ts
@@ -1,4 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { bgBlue, red, bold, italic } from "../fmt/colors.ts";
-console.log(bgBlue(italic(red(bold("Hello world!")))));
+if (import.meta.main) {
+ console.log(bgBlue(italic(red(bold("Hello world!")))));
+}