mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2025-10-11 15:14:59 +00:00
structure, layout and automation
This commit is contained in:
7
node_modules/colorette/LICENSE.md
generated
vendored
Normal file
7
node_modules/colorette/LICENSE.md
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
Copyright © Jorge Bucaran <<https://jorgebucaran.com>>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
111
node_modules/colorette/README.md
generated
vendored
Normal file
111
node_modules/colorette/README.md
generated
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
# Colorette [](https://www.npmjs.org/package/colorette)
|
||||
|
||||
> Color your terminal using pure idiomatic JavaScript.
|
||||
|
||||
Colorette is a Node.js library for embellishing your CLI tools with colors and styles using [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code).
|
||||
|
||||
- ~1.5x faster than alternatives ([run the benchmarks](#run-the-benchmarks)).
|
||||
- No wonky prototype-based method chains.
|
||||
- Automatic color support detection.
|
||||
- ~80 LOC and no dependencies.
|
||||
- [`NO_COLOR`](https://no-color.org) friendly.
|
||||
|
||||
## Quickstart
|
||||
|
||||
```console
|
||||
npm i colorette
|
||||
```
|
||||
|
||||
Import the [styles](#styles) you need. [Here](#supported-styles)'s the list of styles you can use.
|
||||
|
||||
```js
|
||||
import { red, blue, bold } from "colorette"
|
||||
```
|
||||
|
||||
Wrap your strings in one or more styles to produce the finish you're looking for.
|
||||
|
||||
```js
|
||||
console.log(bold(blue("Engage!")))
|
||||
```
|
||||
|
||||
Mix it with [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) to interpolate variables, expressions and create multi-line strings easily.
|
||||
|
||||
```js
|
||||
console.log(`
|
||||
Beets are ${red("red")},
|
||||
Plums are ${blue("blue")},
|
||||
${bold("Colorette!")}.
|
||||
`)
|
||||
```
|
||||
|
||||
Using `console.log`'s [string substitution](https://nodejs.org/api/console.html#console_console_log_data_args) can be useful too.
|
||||
|
||||
```js
|
||||
console.log(bold("Total: $%f"), 1.99)
|
||||
```
|
||||
|
||||
You can also nest styles without breaking existing escape codes.
|
||||
|
||||
```js
|
||||
console.log(red(`Red Shirt ${blue("Blue Shirt")} Red Shirt`))
|
||||
```
|
||||
|
||||
Feeling adventurous? Try the [pipeline operator](https://github.com/tc39/proposal-pipeline-operator).
|
||||
|
||||
```js
|
||||
console.log("Make it so!" |> bold |> blue)
|
||||
```
|
||||
|
||||
## Supported styles
|
||||
|
||||
Colorette supports the standard and bright color variations out-of-the-box. See [this issue](https://github.com/jorgebucaran/colorette/issues/27) if you were looking for TrueColor support.
|
||||
|
||||
| Colors | Background Colors | Bright Colors | Bright Background Colors | Modifiers |
|
||||
| ------- | ----------------- | ------------- | ------------------------ | ----------------- |
|
||||
| black | bgBlack | blackBright | bgBlackBright | dim |
|
||||
| red | bgRed | redBright | bgRedBright | **bold** |
|
||||
| green | bgGreen | greenBright | bgGreenBright | hidden |
|
||||
| yellow | bgYellow | yellowBright | bgYellowBright | _italic_ |
|
||||
| blue | bgBlue | blueBright | bgBlueBright | underline |
|
||||
| magenta | bgMagenta | magentaBright | bgMagentaBright | ~~strikethrough~~ |
|
||||
| cyan | bgCyan | cyanBright | bgCyanBright | reset |
|
||||
| white | bgWhite | whiteBright | bgWhiteBright | |
|
||||
| gray | | | | |
|
||||
|
||||
## API
|
||||
|
||||
### <code><i>style</i>(string)</code>
|
||||
|
||||
Returns a string wrapped in the corresponding ANSI escape codes.
|
||||
|
||||
```js
|
||||
red("Red Alert") //=> \u001b[31mRed Alert\u001b[39m
|
||||
```
|
||||
|
||||
### `options.enabled`
|
||||
|
||||
Color will be enabled if your terminal supports it, `FORCE_COLOR` is defined in [`process.env`](https://nodejs.org/dist/latest-v8.x/docs/api/process.html#process_process_env) and if `NO_COLOR` isn't, but you can always override it if you want.
|
||||
|
||||
```js
|
||||
import { options } from "colorette"
|
||||
|
||||
options.enabled = false
|
||||
```
|
||||
|
||||
## Run the benchmarks
|
||||
|
||||
```
|
||||
npm i -C bench && node bench
|
||||
```
|
||||
|
||||
<pre>
|
||||
colorette × 759,429 ops/sec
|
||||
chalk × 524,034 ops/sec
|
||||
kleur × 490,347 ops/sec
|
||||
colors × 255,661 ops/sec
|
||||
ansi-colors × 317,605 ops/sec
|
||||
</pre>
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE.md)
|
49
node_modules/colorette/colorette.d.ts
generated
vendored
Normal file
49
node_modules/colorette/colorette.d.ts
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
interface Style {
|
||||
(string: string): string
|
||||
}
|
||||
|
||||
export const options: {
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
export const reset: Style
|
||||
export const bold: Style
|
||||
export const dim: Style
|
||||
export const italic: Style
|
||||
export const underline: Style
|
||||
export const inverse: Style
|
||||
export const hidden: Style
|
||||
export const strikethrough: Style
|
||||
export const black: Style
|
||||
export const red: Style
|
||||
export const green: Style
|
||||
export const yellow: Style
|
||||
export const blue: Style
|
||||
export const magenta: Style
|
||||
export const cyan: Style
|
||||
export const white: Style
|
||||
export const gray: Style
|
||||
export const bgBlack: Style
|
||||
export const bgRed: Style
|
||||
export const bgGreen: Style
|
||||
export const bgYellow: Style
|
||||
export const bgBlue: Style
|
||||
export const bgMagenta: Style
|
||||
export const bgCyan: Style
|
||||
export const bgWhite: Style
|
||||
export const blackBright: Style
|
||||
export const redBright: Style
|
||||
export const greenBright: Style
|
||||
export const yellowBright: Style
|
||||
export const blueBright: Style
|
||||
export const magentaBright: Style
|
||||
export const cyanBright: Style
|
||||
export const whiteBright: Style
|
||||
export const bgBlackBright: Style
|
||||
export const bgRedBright: Style
|
||||
export const bgGreenBright: Style
|
||||
export const bgYellowBright: Style
|
||||
export const bgBlueBright: Style
|
||||
export const bgMagentaBright: Style
|
||||
export const bgCyanBright: Style
|
||||
export const bgWhiteBright: Style
|
73
node_modules/colorette/index.cjs
generated
vendored
Normal file
73
node_modules/colorette/index.cjs
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
let enabled =
|
||||
!("NO_COLOR" in process.env) &&
|
||||
("FORCE_COLOR" in process.env ||
|
||||
process.platform === "win32" ||
|
||||
(process.stdout != null &&
|
||||
process.stdout.isTTY &&
|
||||
process.env.TERM &&
|
||||
process.env.TERM !== "dumb"))
|
||||
|
||||
const raw = (open, close, searchRegex, replaceValue) => (s) =>
|
||||
enabled
|
||||
? open +
|
||||
(~(s += "").indexOf(close, 4) // skip opening \x1b[
|
||||
? s.replace(searchRegex, replaceValue)
|
||||
: s) +
|
||||
close
|
||||
: s
|
||||
|
||||
const init = (open, close) => {
|
||||
return raw(
|
||||
`\x1b[${open}m`,
|
||||
`\x1b[${close}m`,
|
||||
new RegExp(`\\x1b\\[${close}m`, "g"),
|
||||
`\x1b[${open}m`
|
||||
)
|
||||
}
|
||||
|
||||
exports.options = Object.defineProperty({}, "enabled", {
|
||||
get: () => enabled,
|
||||
set: (value) => (enabled = value),
|
||||
})
|
||||
|
||||
exports.reset = init(0, 0)
|
||||
exports.bold = raw("\x1b[1m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[1m")
|
||||
exports.dim = raw("\x1b[2m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[2m")
|
||||
exports.italic = init(3, 23)
|
||||
exports.underline = init(4, 24)
|
||||
exports.inverse = init(7, 27)
|
||||
exports.hidden = init(8, 28)
|
||||
exports.strikethrough = init(9, 29)
|
||||
exports.black = init(30, 39)
|
||||
exports.red = init(31, 39)
|
||||
exports.green = init(32, 39)
|
||||
exports.yellow = init(33, 39)
|
||||
exports.blue = init(34, 39)
|
||||
exports.magenta = init(35, 39)
|
||||
exports.cyan = init(36, 39)
|
||||
exports.white = init(37, 39)
|
||||
exports.gray = init(90, 39)
|
||||
exports.bgBlack = init(40, 49)
|
||||
exports.bgRed = init(41, 49)
|
||||
exports.bgGreen = init(42, 49)
|
||||
exports.bgYellow = init(43, 49)
|
||||
exports.bgBlue = init(44, 49)
|
||||
exports.bgMagenta = init(45, 49)
|
||||
exports.bgCyan = init(46, 49)
|
||||
exports.bgWhite = init(47, 49)
|
||||
exports.blackBright = init(90, 39)
|
||||
exports.redBright = init(91, 39)
|
||||
exports.greenBright = init(92, 39)
|
||||
exports.yellowBright = init(93, 39)
|
||||
exports.blueBright = init(94, 39)
|
||||
exports.magentaBright = init(95, 39)
|
||||
exports.cyanBright = init(96, 39)
|
||||
exports.whiteBright = init(97, 39)
|
||||
exports.bgBlackBright = init(100, 49)
|
||||
exports.bgRedBright = init(101, 49)
|
||||
exports.bgGreenBright = init(102, 49)
|
||||
exports.bgYellowBright = init(103, 49)
|
||||
exports.bgBlueBright = init(104, 49)
|
||||
exports.bgMagentaBright = init(105, 49)
|
||||
exports.bgCyanBright = init(106, 49)
|
||||
exports.bgWhiteBright = init(107, 49)
|
73
node_modules/colorette/index.js
generated
vendored
Normal file
73
node_modules/colorette/index.js
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
let enabled =
|
||||
!("NO_COLOR" in process.env) &&
|
||||
("FORCE_COLOR" in process.env ||
|
||||
process.platform === "win32" ||
|
||||
(process.stdout != null &&
|
||||
process.stdout.isTTY &&
|
||||
process.env.TERM &&
|
||||
process.env.TERM !== "dumb"))
|
||||
|
||||
const raw = (open, close, searchRegex, replaceValue) => (s) =>
|
||||
enabled
|
||||
? open +
|
||||
(~(s += "").indexOf(close, 4) // skip opening \x1b[
|
||||
? s.replace(searchRegex, replaceValue)
|
||||
: s) +
|
||||
close
|
||||
: s
|
||||
|
||||
const init = (open, close) => {
|
||||
return raw(
|
||||
`\x1b[${open}m`,
|
||||
`\x1b[${close}m`,
|
||||
new RegExp(`\\x1b\\[${close}m`, "g"),
|
||||
`\x1b[${open}m`
|
||||
)
|
||||
}
|
||||
|
||||
export const options = Object.defineProperty({}, "enabled", {
|
||||
get: () => enabled,
|
||||
set: (value) => (enabled = value),
|
||||
})
|
||||
|
||||
export const reset = init(0, 0)
|
||||
export const bold = raw("\x1b[1m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[1m")
|
||||
export const dim = raw("\x1b[2m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[2m")
|
||||
export const italic = init(3, 23)
|
||||
export const underline = init(4, 24)
|
||||
export const inverse = init(7, 27)
|
||||
export const hidden = init(8, 28)
|
||||
export const strikethrough = init(9, 29)
|
||||
export const black = init(30, 39)
|
||||
export const red = init(31, 39)
|
||||
export const green = init(32, 39)
|
||||
export const yellow = init(33, 39)
|
||||
export const blue = init(34, 39)
|
||||
export const magenta = init(35, 39)
|
||||
export const cyan = init(36, 39)
|
||||
export const white = init(37, 39)
|
||||
export const gray = init(90, 39)
|
||||
export const bgBlack = init(40, 49)
|
||||
export const bgRed = init(41, 49)
|
||||
export const bgGreen = init(42, 49)
|
||||
export const bgYellow = init(43, 49)
|
||||
export const bgBlue = init(44, 49)
|
||||
export const bgMagenta = init(45, 49)
|
||||
export const bgCyan = init(46, 49)
|
||||
export const bgWhite = init(47, 49)
|
||||
export const blackBright = init(90, 39)
|
||||
export const redBright = init(91, 39)
|
||||
export const greenBright = init(92, 39)
|
||||
export const yellowBright = init(93, 39)
|
||||
export const blueBright = init(94, 39)
|
||||
export const magentaBright = init(95, 39)
|
||||
export const cyanBright = init(96, 39)
|
||||
export const whiteBright = init(97, 39)
|
||||
export const bgBlackBright = init(100, 49)
|
||||
export const bgRedBright = init(101, 49)
|
||||
export const bgGreenBright = init(102, 49)
|
||||
export const bgYellowBright = init(103, 49)
|
||||
export const bgBlueBright = init(104, 49)
|
||||
export const bgMagentaBright = init(105, 49)
|
||||
export const bgCyanBright = init(106, 49)
|
||||
export const bgWhiteBright = init(107, 49)
|
73
node_modules/colorette/package.json
generated
vendored
Normal file
73
node_modules/colorette/package.json
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"_from": "colorette@^1.2.1",
|
||||
"_id": "colorette@1.2.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==",
|
||||
"_location": "/colorette",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "colorette@^1.2.1",
|
||||
"name": "colorette",
|
||||
"escapedName": "colorette",
|
||||
"rawSpec": "^1.2.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.2.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/autoprefixer"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz",
|
||||
"_shasum": "4d0b921325c14faf92633086a536db6e89564b1b",
|
||||
"_spec": "colorette@^1.2.1",
|
||||
"_where": "/home/outis/Documents/Sites/BBB/node_modules/autoprefixer",
|
||||
"author": {
|
||||
"name": "Jorge Bucaran"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jorgebucaran/colorette/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Color your terminal using pure idiomatic JavaScript.",
|
||||
"devDependencies": {
|
||||
"c8": "7.2.0",
|
||||
"testmatrix": "0.1.2"
|
||||
},
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"require": "./index.cjs",
|
||||
"import": "./index.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.*",
|
||||
"colorette.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/jorgebucaran/colorette",
|
||||
"keywords": [
|
||||
"colorette",
|
||||
"terminal",
|
||||
"styles",
|
||||
"color",
|
||||
"ansi"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.cjs",
|
||||
"module": "index.js",
|
||||
"name": "colorette",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jorgebucaran/colorette.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node -e \"fs.writeFileSync('index.cjs',fs.readFileSync('index.js','utf8').replace(/export const /g,'exports.'),'utf8')\"",
|
||||
"release": "v=$npm_package_version; git commit -am $v && git tag -s $v -m $v && git push && git push --tags && npm publish",
|
||||
"test": "c8 testmatrix test/*.cjs"
|
||||
},
|
||||
"type": "module",
|
||||
"types": "colorette.d.ts",
|
||||
"version": "1.2.1"
|
||||
}
|
Reference in New Issue
Block a user