From 407df09197f7b8caba7af44d2e4e8f4341d565b8 Mon Sep 17 00:00:00 2001
From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com>
Date: Mon, 20 May 2024 14:01:56 +0200
Subject: [PATCH] doc: update readme
---
.github/deno_readme.ts | 10 ++++++----
README.md | 36 ++++++++++++++++++++++++------------
2 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/.github/deno_readme.ts b/.github/deno_readme.ts
index db428d0f..03ea163b 100644
--- a/.github/deno_readme.ts
+++ b/.github/deno_readme.ts
@@ -9,24 +9,26 @@ import { Logger } from "@libs/logger"
const logger = new Logger({ level: Logger.level.debug })
const root = fromFileUrl(import.meta.resolve("../"))
const document = new DOMParser().parseFromString(await Deno.readTextFile(fromFileUrl(import.meta.resolve("./deno_readme.html"))), "text/html")!
-let table = "
"
+let table = ` |
`
for await (const { path } of expandGlob(`*/deno.jsonc`, { root })) {
- const { icon, supported = [], playground } = JSONC.parse(await Deno.readTextFile(path)) as Record
+ const { icon, description, supported = [], playground } = JSONC.parse(await Deno.readTextFile(path)) as Record
const name = basename(dirname(path))
const log = logger.with({ name, icon, supported, playground })
const features = document.querySelector(`[data-for="${name}"]`)?.outerHTML!
log.info()
log.debug(features)
table += `
- |
+ ${description} |
Metadata and compatibility | Features |
+ |
![](https://jsr.io/badges/@libs/${name}) |
${(supported as string[]).map((platform) => ` `).join("")} |
${features} |
${playground ? ` ` : ""} |
- ![](https://libs-coverage.lecoq.io/${name}/badge.svg) |
`.trim()
+ ![](https://libs-coverage.lecoq.io/${name}/badge.svg) |
+ `.trim()
}
table += "
"
diff --git a/README.md b/README.md
index f88b52ac..21975a7d 100644
--- a/README.md
+++ b/README.md
@@ -7,8 +7,15 @@ This is a collection of carefully crafted _TypeScript_ libraries. These try to b
Most of them are written with [deno](https://deno.com) in mind, but most packages in this repository honors [web standards](https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/The_web_and_web_standards) which means they can be used with other runtimes such
as [Node.js](https://nodejs.org), [bun](https://bun.sh) and even browsers.
- |
+> [!TIP]\
+> Click on a:
+> - *JSR badge* to access the package's page on [jsr.io](https://jsr.io)
+> - *Playground badge* to access the package's interactive playground
+> - *Coverage badge* to access the package's coverage repor.
+
+ |
Code bundlers, formatters, minifiers and others tools. |
Metadata and compatibility | Features |
+ |
![](https://jsr.io/badges/@libs/bundle) |
![](https://jsr.io/logos/deno.svg) |
@@ -20,8 +27,9 @@ as [Node.js](https://nodejs.org), [bun](https://bun.sh) and even browsers.
![](https://img.shields.io/badge/Playground--black?style=flat&logo=deno&labelColor=black) |
- ![](https://libs-coverage.lecoq.io/bundle/badge.svg) |
---|
|
+ ![](https://libs-coverage.lecoq.io/bundle/badge.svg) |
---|
Features based upon Web Crypto APIs |
Metadata and compatibility | Features |
+ |
![](https://jsr.io/badges/@libs/crypto) |
![](https://jsr.io/logos/deno.svg) ![](https://jsr.io/logos/node.svg) ![](https://jsr.io/logos/bun.svg) ![](https://jsr.io/logos/cloudflare-workers.svg) ![](https://jsr.io/logos/browsers.svg) |
@@ -31,8 +39,9 @@ as [Node.js](https://nodejs.org), [bun](https://bun.sh) and even browsers.
![](https://img.shields.io/badge/Playground--black?style=flat&logo=deno&labelColor=black) |
- ![](https://libs-coverage.lecoq.io/crypto/badge.svg) |
---|
|
+ ![](https://libs-coverage.lecoq.io/crypto/badge.svg) |
---|
Diff (patience algorithm) |
Metadata and compatibility | Features |
+ |
![](https://jsr.io/badges/@libs/diff) |
![](https://jsr.io/logos/deno.svg) ![](https://jsr.io/logos/node.svg) ![](https://jsr.io/logos/bun.svg) ![](https://jsr.io/logos/cloudflare-workers.svg) ![](https://jsr.io/logos/browsers.svg) |
@@ -41,8 +50,9 @@ as [Node.js](https://nodejs.org), [bun](https://bun.sh) and even browsers.
![](https://img.shields.io/badge/Playground--black?style=flat&logo=deno&labelColor=black) |
- ![](https://libs-coverage.lecoq.io/diff/badge.svg) |
---|
|
+ ![](https://libs-coverage.lecoq.io/diff/badge.svg) |
---|
Simple logger |
Metadata and compatibility | Features |
+ |
![](https://jsr.io/badges/@libs/logger) |
![](https://jsr.io/logos/deno.svg) ![](https://jsr.io/logos/node.svg) ![](https://jsr.io/logos/bun.svg) ![](https://jsr.io/logos/cloudflare-workers.svg) ![](https://jsr.io/logos/browsers.svg) |
@@ -58,8 +68,9 @@ as [Node.js](https://nodejs.org), [bun](https://bun.sh) and even browsers.
![](https://img.shields.io/badge/Playground--black?style=flat&logo=deno&labelColor=black) |
- ![](https://libs-coverage.lecoq.io/logger/badge.svg) |
---|
|
+ ![](https://libs-coverage.lecoq.io/logger/badge.svg) |
---|
Pure TypeScript QRcode generator with no dependencies. |
Metadata and compatibility | Features |
+ |
![](https://jsr.io/badges/@libs/qrcode) |
![](https://jsr.io/logos/deno.svg) ![](https://jsr.io/logos/node.svg) ![](https://jsr.io/logos/bun.svg) ![](https://jsr.io/logos/cloudflare-workers.svg) ![](https://jsr.io/logos/browsers.svg) |
@@ -69,8 +80,9 @@ as [Node.js](https://nodejs.org), [bun](https://bun.sh) and even browsers.
![](https://img.shields.io/badge/Playground--black?style=flat&logo=deno&labelColor=black) |
- ![](https://libs-coverage.lecoq.io/qrcode/badge.svg) |
---|
|
+ ![](https://libs-coverage.lecoq.io/qrcode/badge.svg) |
---|
Reactive utilities for observable objects. |
Metadata and compatibility | Features |
+ |
![](https://jsr.io/badges/@libs/reactive) |
![](https://jsr.io/logos/deno.svg) ![](https://jsr.io/logos/node.svg) ![](https://jsr.io/logos/bun.svg) ![](https://jsr.io/logos/cloudflare-workers.svg) ![](https://jsr.io/logos/browsers.svg) |
@@ -80,8 +92,9 @@ as [Node.js](https://nodejs.org), [bun](https://bun.sh) and even browsers.
![](https://img.shields.io/badge/Playground--black?style=flat&logo=deno&labelColor=black) |
- ![](https://libs-coverage.lecoq.io/reactive/badge.svg) |
---|
|
+ ![](https://libs-coverage.lecoq.io/reactive/badge.svg) |
---|
Testing utilities for cross-platform testing on Deno, Node.js and Bun. |
Metadata and compatibility | Features |
+ |
![](https://jsr.io/badges/@libs/testing) |
![](https://jsr.io/logos/deno.svg) |
@@ -99,8 +112,9 @@ as [Node.js](https://nodejs.org), [bun](https://bun.sh) and even browsers.
|
- ![](https://libs-coverage.lecoq.io/testing/badge.svg) |
---|
|
+ ![](https://libs-coverage.lecoq.io/testing/badge.svg) |
---|
Utility types. |
Metadata and compatibility | Features |
+ |
![](https://jsr.io/badges/@libs/typing) |
![](https://jsr.io/logos/deno.svg) ![](https://jsr.io/logos/node.svg) ![](https://jsr.io/logos/bun.svg) ![](https://jsr.io/logos/cloudflare-workers.svg) ![](https://jsr.io/logos/browsers.svg) |
@@ -109,8 +123,9 @@ as [Node.js](https://nodejs.org), [bun](https://bun.sh) and even browsers.
|
- ![](https://libs-coverage.lecoq.io/typing/badge.svg) |
---|
|
+ ![](https://libs-coverage.lecoq.io/typing/badge.svg) |
---|
XML parser/stringifier with no dependencies. |
Metadata and compatibility | Features |
+ |
![](https://jsr.io/badges/@libs/xml) |
![](https://jsr.io/logos/deno.svg) ![](https://jsr.io/logos/node.svg) ![](https://jsr.io/logos/bun.svg) ![](https://jsr.io/logos/cloudflare-workers.svg) ![](https://jsr.io/logos/browsers.svg) |
@@ -137,9 +152,6 @@ as [Node.js](https://nodejs.org), [bun](https://bun.sh) and even browsers.
![](https://img.shields.io/badge/Playground--black?style=flat&logo=deno&labelColor=black) |
![](https://libs-coverage.lecoq.io/xml/badge.svg) |
---|
-> [!TIP]\
-> You can click on a JSR badge to access the package page and on a coverage badge to access the coverage report.
-
## ๐งโ๐ป Cli utilities
A set of useful CLI scripts are also provided. Please note that these can only be run on deno runtime.