This commit is contained in:
2022-07-18 02:50:52 +00:00
parent befd344ab0
commit 06181b34d6
8569 changed files with 818704 additions and 352705 deletions
+2 -1048
View File
File diff suppressed because it is too large Load Diff
+7 -10
View File
@@ -2,12 +2,12 @@
var browserslist = require('browserslist');
var colorette = require('colorette');
var postcss = require('postcss');
var agents = require('caniuse-lite').agents;
var pico = require('picocolors');
var Browsers = require('./browsers');
var Prefixes = require('./prefixes');
@@ -75,13 +75,9 @@ module.exports = postcss.plugin('autoprefixer', function () {
reqs = options.overrideBrowserslist;
} else if (options.browsers) {
if (typeof console !== 'undefined' && console.warn) {
if (colorette.red) {
console.warn(colorette.red(WARNING.replace(/`[^`]+`/g, function (i) {
return colorette.yellow(i.slice(1, -1));
})));
} else {
console.warn(WARNING);
}
console.warn(pico.red(WARNING.replace(/`[^`]+`/g, function (i) {
return pico.yellow(i.slice(1, -1));
})));
}
reqs = options.browsers;
@@ -89,7 +85,8 @@ module.exports = postcss.plugin('autoprefixer', function () {
var brwlstOpts = {
ignoreUnknownVersions: options.ignoreUnknownVersions,
stats: options.stats
stats: options.stats,
env: options.env
};
function loadPrefixes(opts) {
-1
View File
@@ -60,7 +60,6 @@ var Browsers = /*#__PURE__*/function () {
}
opts.path = this.options.from;
opts.env = this.options.env;
return browserslist(requirements, opts);
}
/**
+15
View File
@@ -0,0 +1,15 @@
ISC License
Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+23
View File
@@ -0,0 +1,23 @@
# picocolors
npm install picocolors
A tinier and faster alternative to [nanocolors](https://github.com/ai/nanocolors). Andrey, are you even trying?
```javascript
import pc from "picocolors";
console.log(pc.green(`How are ${pc.italic(`you`)} doing?`));
```
- Up to [2x faster and 2x smaller](#benchmarks) than alternatives
- 3x faster and 10x smaller than `chalk`
- [TypeScript](https://www.typescriptlang.org/) support
- [`NO_COLOR`](https://no-color.org/) friendly
- Node.js v6+ & browsers support
- The same API, but faster, much faster
- No `String.prototype` modifications (anyone still doing it?)
- No dependencies and the smallest `node_modules` footprint
## Docs
Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub.
+62
View File
@@ -0,0 +1,62 @@
{
"_args": [
[
"picocolors@0.2.1",
"/home/node/nuxt"
]
],
"_from": "picocolors@0.2.1",
"_id": "picocolors@0.2.1",
"_inBundle": false,
"_integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
"_location": "/autoprefixer/picocolors",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "picocolors@0.2.1",
"name": "picocolors",
"escapedName": "picocolors",
"rawSpec": "0.2.1",
"saveSpec": null,
"fetchSpec": "0.2.1"
},
"_requiredBy": [
"/autoprefixer"
],
"_resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
"_spec": "0.2.1",
"_where": "/home/node/nuxt",
"author": {
"name": "Alexey Raspopov"
},
"browser": {
"./picocolors.js": "./picocolors.browser.js"
},
"bugs": {
"url": "https://github.com/alexeyraspopov/picocolors/issues"
},
"description": "The tiniest and the fastest coloring library ever",
"files": [
"picocolors.*",
"types.ts"
],
"homepage": "https://github.com/alexeyraspopov/picocolors#readme",
"keywords": [
"terminal",
"colors",
"formatting",
"cli",
"console"
],
"license": "ISC",
"main": "./picocolors.js",
"name": "picocolors",
"repository": {
"type": "git",
"url": "git+https://github.com/alexeyraspopov/picocolors.git"
},
"sideEffects": false,
"types": "./picocolors.d.ts",
"version": "0.2.1"
}
@@ -0,0 +1,4 @@
var x=String;
var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}};
module.exports=create();
module.exports.createColors = create;
+5
View File
@@ -0,0 +1,5 @@
import { Colors } from "./types"
declare const picocolors: Colors & { createColors: (enabled: boolean) => Colors }
export = picocolors
+60
View File
@@ -0,0 +1,60 @@
let tty = require("tty")
let isColorSupported =
!("NO_COLOR" in process.env || process.argv.includes("--no-color")) &&
("FORCE_COLOR" in process.env ||
process.argv.includes("--color") ||
process.platform === "win32" ||
(tty.isatty(1) && process.env.TERM !== "dumb") ||
"CI" in process.env)
function formatter(open, close, replace = open) {
return (input) => {
let string = "" + input
let index = string.indexOf(close, open.length)
return !~index
? open + string + close
: open + replaceClose(string, close, replace, index) + close
}
}
function replaceClose(string, close, replace, index) {
let start = string.substring(0, index) + replace
let end = string.substring(index + close.length)
let nextIndex = end.indexOf(close)
return !~nextIndex ? start + end : start + replaceClose(end, close, replace, nextIndex)
}
function createColors(enabled = isColorSupported) {
return {
isColorSupported: enabled,
reset: enabled ? (s) => `\x1b[0m${s}\x1b[0m` : String,
bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String,
}
}
module.exports = createColors()
module.exports.createColors = createColors
+30
View File
@@ -0,0 +1,30 @@
export type Formatter = (input: string | number | null | undefined) => string
export interface Colors {
isColorSupported: boolean
reset: Formatter
bold: Formatter
dim: Formatter
italic: Formatter
underline: Formatter
inverse: Formatter
hidden: Formatter
strikethrough: Formatter
black: Formatter
red: Formatter
green: Formatter
yellow: Formatter
blue: Formatter
magenta: Formatter
cyan: Formatter
white: Formatter
gray: Formatter
bgBlack: Formatter
bgRed: Formatter
bgGreen: Formatter
bgYellow: Formatter
bgBlue: Formatter
bgMagenta: Formatter
bgCyan: Formatter
bgWhite: Formatter
}
+14 -21
View File
@@ -1,32 +1,32 @@
{
"_args": [
[
"autoprefixer@9.8.5",
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
"autoprefixer@9.8.8",
"/home/node/nuxt"
]
],
"_from": "autoprefixer@9.8.5",
"_id": "autoprefixer@9.8.5",
"_from": "autoprefixer@9.8.8",
"_id": "autoprefixer@9.8.8",
"_inBundle": false,
"_integrity": "sha512-C2p5KkumJlsTHoNv9w31NrBRgXhf6eCMteJuHZi2xhkgC+5Vm40MEtCKPhc0qdgAOhox0YPy1SQHTAky05UoKg==",
"_integrity": "sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA==",
"_location": "/autoprefixer",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "autoprefixer@9.8.5",
"raw": "autoprefixer@9.8.8",
"name": "autoprefixer",
"escapedName": "autoprefixer",
"rawSpec": "9.8.5",
"rawSpec": "9.8.8",
"saveSpec": null,
"fetchSpec": "9.8.5"
"fetchSpec": "9.8.8"
},
"_requiredBy": [
"/postcss-preset-env"
],
"_resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.5.tgz",
"_spec": "9.8.5",
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
"_resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.8.tgz",
"_spec": "9.8.8",
"_where": "/home/node/nuxt",
"author": {
"name": "Andrey Sitnik",
"email": "andrey@sitnik.ru"
@@ -34,26 +34,19 @@
"bin": {
"autoprefixer": "bin/autoprefixer"
},
"browser": {
"colorette": false,
"chalk": false
},
"bugs": {
"url": "https://github.com/postcss/autoprefixer/issues"
},
"dependencies": {
"browserslist": "^4.12.0",
"caniuse-lite": "^1.0.30001097",
"colorette": "^1.2.0",
"caniuse-lite": "^1.0.30001109",
"normalize-range": "^0.1.2",
"num2fraction": "^1.2.2",
"picocolors": "^0.2.1",
"postcss": "^7.0.32",
"postcss-value-parser": "^4.1.0"
},
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
"eslintIgnore": [
"build/"
],
"funding": {
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/autoprefixer"
@@ -73,5 +66,5 @@
"type": "git",
"url": "git+https://github.com/postcss/autoprefixer.git"
},
"version": "9.8.5"
"version": "9.8.8"
}