@katnip-org/compiler 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/utils/colors.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Minimal ANSI colorizer, drop in for picocolors.
|
|
3
3
|
*/
|
|
4
|
-
const
|
|
4
|
+
const proc = globalThis.process;
|
|
5
|
+
const useColor = proc?.env?.NO_COLOR == null && proc?.stdout?.isTTY === true;
|
|
5
6
|
const wrap = (open, close) => (s) => useColor ? `\x1b[${open}m${s}\x1b[${close}m` : s;
|
|
6
7
|
export const pc = {
|
|
7
8
|
red: wrap(31, 39),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC;AAChC,MAAM,QAAQ,GAAG,IAAI,EAAE,GAAG,EAAE,QAAQ,IAAI,IAAI,IAAI,IAAI,EAAE,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC;AAE7E,MAAM,IAAI,GACN,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE,CAChC,CAAC,CAAS,EAAU,EAAE,CAClB,QAAQ,CAAC,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzD,MAAM,CAAC,MAAM,EAAE,GAAG;IACd,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;IACjB,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;IAClB,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC;CACpB,CAAC"}
|