deno2.nix/examples/simple/mod.ts
SnO₂WMaN 21efd7ac82
feat: Update for deno2nix v2 (#21)
* move simple script to `examples/simple`

* rm vscode settings.json

* example npm

* wip

* refactoring

* Update mkExecutable

* rm custom formatter  from vscode extensions

* Add .gitignore

* Update flake.nix

* bundled/executable wip

* Update flake

* importMap

* bundled wrapper

* somerefactoring

* no more overlay(default)

* add todo

* Update README.md
2022-12-14 13:00:56 +09:00

33 lines
2.3 KiB
TypeScript

import { bgBlack, black, rgb24, white } from "std/fmt/colors.ts";
console.log(`Hello!`);
console.log(`This script was written for ${bgBlack(white("deno"))}${black("2")}${rgb24("Nix", 0x7E7EFF)}.`);
// https://github.com/dylanaraps/neofetch/blob/ccd5d9f52609bbdcd5d8fa78c4fdb0f12954125f/neofetch#L8976-L8998
const c1 = (t: string) => rgb24(t, 0x4D6FB6);
const c2 = (t: string) => rgb24(t, 0x7EB6E1);
console.log(
[
c1(" ▗▄▄▄ ") + c2("▗▄▄▄▄ ▄▄▄▖"),
c1(" ▜███▙ ") + c2("▜███▙ ▟███▛"),
c1(" ▜███▙ ") + c2("▜███▙▟███▛"),
c1(" ▜███▙ ") + c2("▜██████▛"),
c1(" ▟█████████████████▙ ") + c2("▜████▛ ") + c1("▟▙"),
c1(" ▟███████████████████▙ ") + c2("▜███▙ ") + c1("▟██▙"),
c2(" ▄▄▄▄▖ ") + c2("▜███▙ ") + c1("▟███▛"),
c2(" ▟███▛ ") + c2("▜██▛ ") + c1("▟███▛"),
c2(" ▟███▛ ") + c2("▜▛ ") + c1("▟███▛"),
c2("▟███████████▛ ") + c1("▟██████████▙"),
c2("▜██████████▛ ") + c1("▟███████████▛"),
c2(" ▟███▛") + c1(" ▟▙ ") + c1("▟███▛"),
c2(" ▟███▛") + c1(" ▟██▙ ") + c1("▟███▛"),
c2(" ▟███▛") + c1(" ▜███▙ ") + c1("▝▀▀▀▀"),
c2(" ▜██▛") + c1(" ▜███▙ ") + c2("▜██████████████████▛"),
c2(" ▜▛") + c1(" ▟████▙ ") + c2("▜████████████████▛"),
c1(" ▟██████▙ ") + c2("▜███▙"),
c1(" ▟███▛▜███▙ ") + c2("▜███▙"),
c1(" ▟███▛ ▜███▙ ") + c2("▜███▙"),
c1(" ▝▀▀▀ ▀▀▀▀▘ ") + c2("▀▀▀▘"),
].join("\n"),
);