Merge branch 'master' of https://github.com/lowlighter/metrics
This commit is contained in:
@@ -370,6 +370,8 @@ Generate metrics that can be embedded everywhere, including your GitHub profile
|
|||||||
# 📚 Documentation
|
# 📚 Documentation
|
||||||
|
|
||||||
|
|
||||||
|
> <sup>*⚠️ This is the documentation of **v3.26-beta** (`@master`/`@main` branches) which includes [unreleased features](https://github.com/lowlighter/metrics/compare/latest...master) planned for next release. See documentation for current released version [**v3.25** (`@latest` branch) here](https://github.com/lowlighter/metrics/blob/latest/README.md).* </sup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 🦮 Setup
|
## 🦮 Setup
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import processes from "child_process"
|
|||||||
import crypto from "crypto"
|
import crypto from "crypto"
|
||||||
import { minify as csso } from "csso"
|
import { minify as csso } from "csso"
|
||||||
import emoji from "emoji-name-map"
|
import emoji from "emoji-name-map"
|
||||||
|
import { fileTypeFromBuffer } from "file-type"
|
||||||
import fss from "fs"
|
import fss from "fs"
|
||||||
import fs from "fs/promises"
|
import fs from "fs/promises"
|
||||||
import sharp from "sharp"
|
|
||||||
import linguist from "linguist-js"
|
import linguist from "linguist-js"
|
||||||
import { marked } from "marked"
|
import { marked } from "marked"
|
||||||
import minimatch from "minimatch"
|
import minimatch from "minimatch"
|
||||||
@@ -23,17 +23,17 @@ import purgecss from "purgecss"
|
|||||||
import readline from "readline"
|
import readline from "readline"
|
||||||
import rss from "rss-parser"
|
import rss from "rss-parser"
|
||||||
import htmlsanitize from "sanitize-html"
|
import htmlsanitize from "sanitize-html"
|
||||||
|
import sharp from "sharp"
|
||||||
import git from "simple-git"
|
import git from "simple-git"
|
||||||
import SVGO from "svgo"
|
import SVGO from "svgo"
|
||||||
import twemojis from "twemoji-parser"
|
import twemojis from "twemoji-parser"
|
||||||
import url from "url"
|
import url from "url"
|
||||||
import util from "util"
|
import util from "util"
|
||||||
import xmlformat from "xml-formatter"
|
import xmlformat from "xml-formatter"
|
||||||
import {fileTypeFromBuffer} from "file-type"
|
|
||||||
prism_lang()
|
prism_lang()
|
||||||
|
|
||||||
//Exports
|
//Exports
|
||||||
export { axios, emoji, fetch, fs, git, sharp, minimatch, opengraph, os, paths, processes, rss, url, util }
|
export { axios, emoji, fetch, fs, git, minimatch, opengraph, os, paths, processes, rss, sharp, url, util }
|
||||||
|
|
||||||
/**Returns module __dirname */
|
/**Returns module __dirname */
|
||||||
export function __module(module) {
|
export function __module(module) {
|
||||||
@@ -338,9 +338,10 @@ export async function imgb64(image, {width, height, fallback = true} = {}) {
|
|||||||
ext = (await fileTypeFromBuffer(buffer)).ext ?? ext
|
ext = (await fileTypeFromBuffer(buffer)).ext ?? ext
|
||||||
image = sharp(buffer)
|
image = sharp(buffer)
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
image = sharp(image)
|
image = sharp(image)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch {
|
catch {
|
||||||
return imgb64(null, {fallback})
|
return imgb64(null, {fallback})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,8 +75,7 @@
|
|||||||
<img width="900" height="1" alt=""></td>
|
<img width="900" height="1" alt=""></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap">✨ On <code>master</code>/<code>main</code><br>
|
<td nowrap="nowrap"><b>type:</b> <code>boolean</code>
|
||||||
<b>type:</b> <code>boolean</code>
|
|
||||||
<br>
|
<br>
|
||||||
<b>default:</b> yes<br></td>
|
<b>default:</b> yes<br></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -123,8 +123,7 @@ Recent language activity may also displayed (it requires extras features to be e
|
|||||||
<img width="900" height="1" alt=""></td>
|
<img width="900" height="1" alt=""></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap">✨ On <code>master</code>/<code>main</code><br>
|
<td nowrap="nowrap"><b>type:</b> <code>number</code>
|
||||||
<b>type:</b> <code>number</code>
|
|
||||||
<i>(0 ≤
|
<i>(0 ≤
|
||||||
𝑥
|
𝑥
|
||||||
≤ 8)</i>
|
≤ 8)</i>
|
||||||
|
|||||||
@@ -101,8 +101,7 @@ It uses <a href="https://developers.google.com/speed/docs/insights/v5/get-starte
|
|||||||
<img width="900" height="1" alt=""></td>
|
<img width="900" height="1" alt=""></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap">✨ On <code>master</code>/<code>main</code><br>
|
<td nowrap="nowrap"><b>type:</b> <code>boolean</code>
|
||||||
<b>type:</b> <code>boolean</code>
|
|
||||||
<br>
|
<br>
|
||||||
<b>default:</b> no<br></td>
|
<b>default:</b> no<br></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -63,8 +63,7 @@
|
|||||||
<img width="900" height="1" alt=""></td>
|
<img width="900" height="1" alt=""></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap">✨ On <code>master</code>/<code>main</code><br>
|
<td nowrap="nowrap"><b>type:</b> <code>number</code>
|
||||||
<b>type:</b> <code>number</code>
|
|
||||||
<i>(0 ≤
|
<i>(0 ≤
|
||||||
𝑥
|
𝑥
|
||||||
≤ 6)</i>
|
≤ 6)</i>
|
||||||
|
|||||||
Reference in New Issue
Block a user