This is a simple tool to enhance the HTML documentation generated by the Deno
CLI's builtin command, deno doc --html
(Deno v1.38.0+). It improves the CSS
styling, adding support for dark mode and persisted color scheme preferences,
along with some other usability improvements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* User-extensible type for encoding types that can be used with the `DataURL` | |
* class. This interface can be extended using TypeSript's declaration merging, | |
* to supplement the built-in encoding types. */ | |
// deno-lint-ignore no-empty-interface | |
export interface EncodingTypeMap { | |
"uri": "uri"; | |
"url": "uri"; | |
"uri-component": "uri"; | |
"percent": "uri"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*~----------------------------------------~*\ | |
* CHAINABLE DECORATORS UTILITY CLASS * | |
* FOR TYPESCRIPT 5.0 * | |
*~----------------------------------------~* | |
* © 2023-2024 NICHOLAS BERLETTE • MIT * | |
\*~----------------------------------------~*/ | |
// deno-lint-ignore-file no-explicit-any ban-types | |
import type { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. | |
// Copyright 2019 Allain Lalonde. All rights reserved. ISC License. | |
import { | |
type AnyConstructor, | |
type Matcher, | |
matchers, | |
type TypeNames, | |
} from "./matchers.ts"; | |
import { AssertionError, type Async, type Fn, isPromiseLike } from "./utils.ts"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Iterator } from "./iterator.ts"; | |
/** Simple numeric iterator that returns the numbers passed to the constructor. Extremely useless. */ | |
export class NumericIterator extends Iterator<number> { | |
#index = 0; | |
#numbers: number[] = []; | |
constructor(...numbers: number[]) { | |
super(); | |
this.#numbers = numbers; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TASK_NAME_REGEXP = /^[a-z\^\$][a-z0-9\-_$:.\^]*$/i; | |
type TaskConfig = { [key: string]: string }; | |
type HooksConfig<K extends MaybeHookNames = Hook.Name> = { | |
readonly [P in K]: string | string[]; | |
}; | |
type HookNames = typeof Hook.names[number]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum EOL { | |
CRLF = "\r\n", | |
CR = "\r", | |
LF = "\n", | |
} | |
export interface Options { | |
newLine?: EOL | `${EOL}`; | |
lineWidth?: number; | |
tabSize?: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum CharacterCodes { | |
Null = 0, | |
/** | |
* The `\b` character. | |
*/ | |
Backspace = 8, | |
/** | |
* The `\t` character. | |
*/ | |
Tab = 9, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum Char { | |
Null = 0, | |
/** | |
* The `\b` character. | |
*/ | |
Backspace = 8, | |
/** | |
* The `\t` character. | |
*/ | |
Tab = 9, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--bg-body: rgb(231 229 228); | |
--bg-content: white; | |
--bg-highlight: white; | |
--bg-searchbar: rgb(231 229 228); | |
--bg-search-results-hover: rgb(243 244 246); | |
--bg-code: rgb(243 244 246); | |
--bg-overload-label: rgb(243 244 246); |