deno2.nix/examples/npm/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

37 lines
2.4 KiB
TypeScript

import chalk from "chalk";
console.log(`Hello!`);
console.log(
`This script was written for ${chalk.bgBlack(chalk.white("deno"))}${chalk.black("2")}${
chalk.rgb(126, 126, 255)("Nix")
} with npm ${chalk.italic("chalk")} module.`,
);
// https://github.com/dylanaraps/neofetch/blob/ccd5d9f52609bbdcd5d8fa78c4fdb0f12954125f/neofetch#L8976-L8998
const c1 = (t: string) => chalk.rgb(71, 111, 182)(t);
const c2 = (t: string) => chalk.rgb(126, 182, 225)(t);
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"),
);