Comments (7)
I know that the size of
ansis
is important for you
This is important not so much for me as for the developers who compare many libs and one of the most important criterion is the size :-)
Your implementation adds to dist only 29 bytes
, perfect!
Thank You so much!
I will publish new package now.
from ansis.
I know that the size of ansis
is important for you, so I'm not pushing for any particular implementation, @webdiscus
Therefore, I just want to convey the idea that isTTY
is missing in PM2 case, but the actual terminal can still support colors.
from ansis.
Or, maybe the exception could be made here, @webdiscus (probably more readable):
const isTTY = isNextJS || isPM2 || (isDeno ? Deno.isatty(1) : stdout && 'isTTY' in stdout);
from ansis.
I collected all my suggestions and ideas in PR #20 , including tests, @webdiscus .
I tested it manually on my machine using local build and linked references.
And it works.
from ansis.
The version 3.1.0
has been released with PM2 support.
Thanks!
from ansis.
Hello @RobinTail
thanks for the feature request.
I will add the supports for PM2.
How many colors does PM2, truecolor, 256, 16 support?
from ansis.
It should depend on the actual terminal, meaning that the lines AFTER the line 47 (isTTY
condition) should be executed
Lines 49 to 69 in 9f78e35
Basically, the lack of isTTY
should be ignored when PM2 is detected, @webdiscus
from ansis.
Related Issues (9)
- [Feature Request] British English (Gray & Grey) HOT 3
- [BUG] 1.3.5 seems broken HOT 10
- [Suggestions] Improving types and expose colours as named exports HOT 10
- [BUG] 1.5.0 missing exports main HOT 10
- Doesn't work in Next.js middleware (Edge functions) HOT 19
- [FEATURE REQUEST] Fallbacks when true color or ANSI 256 is not supported HOT 13
- [FEATURE REQUEST] Expose `supportsColor` or similar HOT 7
- isSupported returns true when redirecting stdout on windows HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansis.