Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions elm/src/Test/Runner/Node/Vendor/Console.elm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Not all terminals support this.
-}
dark : String -> String
dark str =
String.join "" [ "\u{001B}[2m", str, "\u{001B}[22m" ]
"\u{001B}[2m" ++ str ++ "\u{001B}[22m"


{-| Make the text bold.
Expand All @@ -80,7 +80,7 @@ Some terminals implement this as a color change rather than a boldness change.
-}
bold : String -> String
bold str =
String.join "" [ "\u{001B}[1m", str, "\u{001B}[22m" ]
"\u{001B}[1m" ++ str ++ "\u{001B}[22m"


{-| Make the text underlined.
Expand All @@ -100,14 +100,14 @@ Not all terminals support this.
-}
underline : String -> String
underline str =
String.join "" [ "\u{001B}[4m", str, "\u{001B}[24m" ]
"\u{001B}[4m" ++ str ++ "\u{001B}[24m"


{-| Invert the foreground and background colors from what they would otherwise be.
-}
colorsInverted : String -> String
colorsInverted str =
String.join "" [ "\u{001B}[7m", str, "\u{001B}[27m" ]
"\u{001B}[7m" ++ str ++ "\u{001B}[27m"



Expand All @@ -118,56 +118,56 @@ colorsInverted str =
-}
black : String -> String
black str =
String.join "" [ "\u{001B}[30m", str, "\u{001B}[39m" ]
"\u{001B}[30m" ++ str ++ "\u{001B}[39m"


{-| Make the foreground text red.
-}
red : String -> String
red str =
String.join "" [ "\u{001B}[31m", str, "\u{001B}[39m" ]
"\u{001B}[31m" ++ str ++ "\u{001B}[39m"


{-| Make the foreground text green.
-}
green : String -> String
green str =
String.join "" [ "\u{001B}[32m", str, "\u{001B}[39m" ]
"\u{001B}[32m" ++ str ++ "\u{001B}[39m"


{-| Make the foreground text yellow.
-}
yellow : String -> String
yellow str =
String.join "" [ "\u{001B}[33m", str, "\u{001B}[39m" ]
"\u{001B}[33m" ++ str ++ "\u{001B}[39m"


{-| Make the foreground text blue.
-}
blue : String -> String
blue str =
String.join "" [ "\u{001B}[34m", str, "\u{001B}[39m" ]
"\u{001B}[34m" ++ str ++ "\u{001B}[39m"


{-| Make the foreground text magenta.
-}
magenta : String -> String
magenta str =
String.join "" [ "\u{001B}[35m", str, "\u{001B}[39m" ]
"\u{001B}[35m" ++ str ++ "\u{001B}[39m"


{-| Make the foreground text cyan.
-}
cyan : String -> String
cyan str =
String.join "" [ "\u{001B}[36m", str, "\u{001B}[39m" ]
"\u{001B}[36m" ++ str ++ "\u{001B}[39m"


{-| Make the foreground text white.
-}
white : String -> String
white str =
String.join "" [ "\u{001B}[37m", str, "\u{001B}[39m" ]
"\u{001B}[37m" ++ str ++ "\u{001B}[39m"



Expand All @@ -178,53 +178,53 @@ white str =
-}
bgBlack : String -> String
bgBlack str =
String.join "" [ "\u{001B}[40m", str, "\u{001B}[49m" ]
"\u{001B}[40m" ++ str ++ "\u{001B}[49m"


{-| Make the background red.
-}
bgRed : String -> String
bgRed str =
String.join "" [ "\u{001B}[41m", str, "\u{001B}[49m" ]
"\u{001B}[41m" ++ str ++ "\u{001B}[49m"


{-| Make the background green.
-}
bgGreen : String -> String
bgGreen str =
String.join "" [ "\u{001B}[42m", str, "\u{001B}[49m" ]
"\u{001B}[42m" ++ str ++ "\u{001B}[49m"


{-| Make the background yellow.
-}
bgYellow : String -> String
bgYellow str =
String.join "" [ "\u{001B}[43m", str, "\u{001B}[49m" ]
"\u{001B}[43m" ++ str ++ "\u{001B}[49m"


{-| Make the background blue.
-}
bgBlue : String -> String
bgBlue str =
String.join "" [ "\u{001B}[44m", str, "\u{001B}[49m" ]
"\u{001B}[44m" ++ str ++ "\u{001B}[49m"


{-| Make the background magenta.
-}
bgMagenta : String -> String
bgMagenta str =
String.join "" [ "\u{001B}[45m", str, "\u{001B}[49m" ]
"\u{001B}[45m" ++ str ++ "\u{001B}[49m"


{-| Make the background cyan.
-}
bgCyan : String -> String
bgCyan str =
String.join "" [ "\u{001B}[46m", str, "\u{001B}[49m" ]
"\u{001B}[46m" ++ str ++ "\u{001B}[49m"


{-| Make the background white.
-}
bgWhite : String -> String
bgWhite str =
String.join "" [ "\u{001B}[47m", str, "\u{001B}[49m" ]
"\u{001B}[47m" ++ str ++ "\u{001B}[49m"
Loading