summaryrefslogtreecommitdiff
path: root/std/examples
diff options
context:
space:
mode:
authorYusuke Sakurai <kerokerokerop@gmail.com>2020-02-28 05:12:04 +0900
committerGitHub <noreply@github.com>2020-02-27 15:12:04 -0500
commitc65d0c63e78ba3b50bf1260e40d999e35fda8d05 (patch)
treeaa44986eb35a14413b7c799212cc4e8c37d14b75 /std/examples
parentfa5f3aa600311000cee0a4c794f85d48e6397362 (diff)
reduce unnecessary output on tests (#4148)
Diffstat (limited to 'std/examples')
-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!")))));
+}