Skip to content

Commit

Permalink
consolidate deps
Browse files Browse the repository at this point in the history
  • Loading branch information
crookse committed Mar 1, 2021
1 parent 7e279d0 commit 67b421d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
24 changes: 11 additions & 13 deletions cli/ascii/drash.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as colours from "https://deno.land/std@0.74.0/fmt/colors.ts";
import { colors } from "../../deps.ts";

let ascii = `@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@@@@@@@@@
Expand Down Expand Up @@ -31,33 +31,33 @@ const maxHashesForRed = 33;
n = 0;
ascii = ascii.replace(
/#/g,
(match) => n++ < maxHashesForRed ? colours.red("#") : "#",
(match) => n++ < maxHashesForRed ? colors.red("#") : "#",
);
n = 0;
const maxAndsForRed = 53;
ascii = ascii.replace(
/&/g,
(match) => n++ < maxAndsForRed ? colours.red("&") : "&",
(match) => n++ < maxAndsForRed ? colors.red("&") : "&",
);
n = 0;
const maxPercentForRed = 30;
ascii = ascii.replace(
/%/g,
(match) => n++ < maxPercentForRed ? colours.red("%") : "%",
(match) => n++ < maxPercentForRed ? colors.red("%") : "%",
);

// DO YELLOW
const maxSlashesforYellow = 44;
n = 0;
ascii = ascii.replace(
/\//g,
(match) => n++ < maxSlashesforYellow ? colours.yellow("/") : "/",
(match) => n++ < maxSlashesforYellow ? colors.yellow("/") : "/",
);
n = 0;
const maxBracketForYellow = 1;
ascii = ascii.replace(
/\(/g,
(match) => n++ < maxBracketForYellow ? colours.yellow("(") : "(",
(match) => n++ < maxBracketForYellow ? colors.yellow("(") : "(",
);

// DO BLUE
Expand All @@ -66,17 +66,15 @@ const maxSlashesForBlue = 200; // way over, but no more after so we can specify
ascii = ascii.replace(
/\//g,
(match) =>
n++ < maxSlashesForBlue && n > maxSlashesforYellow
? colours.blue("/")
: "/",
n++ < maxSlashesForBlue && n > maxSlashesforYellow ? colors.blue("/") : "/",
);
n = 0;
const maxBracketsForBlue = 82;
ascii = ascii.replace(
/\(/g,
(match) =>
n++ < maxBracketsForBlue && n > maxBracketForYellow
? colours.blue("(")
? colors.blue("(")
: "(",
);

Expand All @@ -86,21 +84,21 @@ const maxHashesForGreen = 210;
ascii = ascii.replace(
/#/g,
(match) =>
n++ < maxHashesForGreen && n > maxHashesForRed ? colours.green("#") : "#",
n++ < maxHashesForGreen && n > maxHashesForRed ? colors.green("#") : "#",
);
n = 0;
const maxPercentForGreen = 200;
ascii = ascii.replace(
/%/g,
(match) =>
n++ < maxPercentForGreen && n > maxPercentForRed ? colours.green("%") : "%",
n++ < maxPercentForGreen && n > maxPercentForRed ? colors.green("%") : "%",
);
n = 0;
const maxAndsForGreen = 200;
ascii = ascii.replace(
/&/g,
(match) =>
n++ < maxAndsForGreen && n > maxAndsForRed ? colours.green("&") : "&",
n++ < maxAndsForGreen && n > maxAndsForRed ? colors.green("&") : "&",
);

export const drashLogoInAsciiWithColour = ascii;
2 changes: 2 additions & 0 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export * as colors from "https://deno.land/std@0.88.0/fmt/colors.ts";
export { serve } from "https://deno.land/std@0.88.0/http/server.ts";
export { Rhum } from "https://deno.land/x/rhum@v1.1.6/mod.ts";
2 changes: 1 addition & 1 deletion index/benchmarks/app_http.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IndexService } from "../index_service.ts";
import { serve } from "https://deno.land/std@0.74.0/http/server.ts";
import { serve } from "../../deps.ts";
import { dataset } from "./dataset.ts";

const lt = new Map<number, string>();
Expand Down
2 changes: 1 addition & 1 deletion loggers/console_logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { colors } from "./deps.ts";
import { colors } from "../deps.ts";

export class ConsoleLogger {
/**
Expand Down
1 change: 0 additions & 1 deletion loggers/deps.ts

This file was deleted.

0 comments on commit 67b421d

Please sign in to comment.