fix: init banner not colored in ansi256 terminals (#1456)
This basically uses the same fix as #1377 and #1323 for the init script. Before: <img width="505" alt="Screenshot 2023-07-12 at 22 18 29" src="https://github.com/denoland/fresh/assets/1062408/e77c3110-d3e2-479e-8381-c67c39e216fa"> After: <img width="446" alt="Screenshot 2023-07-12 at 22 18 38" src="https://github.com/denoland/fresh/assets/1062408/debda939-bdce-4890-8dfb-265a4e1b8328">
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { basename, join, parse, resolve } from "./src/dev/deps.ts";
|
||||
import { basename, colors, join, parse, resolve } from "./src/dev/deps.ts";
|
||||
import { error } from "./src/dev/error.ts";
|
||||
import { collect, ensureMinDenoVersion, generate } from "./src/dev/mod.ts";
|
||||
import {
|
||||
@@ -42,11 +42,14 @@ const flags = parse(Deno.args, {
|
||||
default: { "force": null, "twind": null, "vscode": null },
|
||||
});
|
||||
|
||||
console.log();
|
||||
console.log(
|
||||
`\n%c 🍋 Fresh: the next-gen web framework. %c\n`,
|
||||
"background-color: #86efac; color: black; font-weight: bold",
|
||||
"",
|
||||
colors.bgRgb8(
|
||||
colors.black(colors.bold(" 🍋 Fresh: The next-gen web framework. ")),
|
||||
121,
|
||||
),
|
||||
);
|
||||
console.log();
|
||||
|
||||
let unresolvedDirectory = Deno.args[0];
|
||||
if (flags._.length !== 1) {
|
||||
|
||||
Reference in New Issue
Block a user