Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add examples for tty.getColorDepth() env #26248

Closed
wants to merge 5 commits into from

Conversation

BridgeAR
Copy link
Member

This adds some examples what values can be used to enforce a specific
color support in Node.js.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

This adds some examples what values can be used to enforce a specific
color support in Node.js.
@BridgeAR BridgeAR added the tty Issues and PRs related to the tty subsystem. label Feb 21, 2019
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Feb 21, 2019
doc/api/tty.md Outdated Show resolved Hide resolved
doc/api/tty.md Outdated Show resolved Hide resolved
doc/api/tty.md Outdated Show resolved Hide resolved
Trott and others added 3 commits February 21, 2019 21:52
Co-Authored-By: BridgeAR <ruben@bridgewater.de>
Co-Authored-By: BridgeAR <ruben@bridgewater.de>
@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 21, 2019
This rule does not apply to Windows OS, CI environments, and some other rare
cases.

* 2 colors: `NODE_DISABLE_COLORS = 1`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works on Windows

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I updated the comment again to reflect that. PTAL.

@BridgeAR
Copy link
Member Author

Hm... Hyper doesn't support 24 bit colors anymore and I used that in here as example. Therefore I consider doing something else instead of these examples as they could change over time without the change being reflected in the docs.

@BridgeAR BridgeAR added wip Issues and PRs that are still a work in progress. and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Feb 22, 2019
@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 7, 2019

Closed in favor of #26485

@BridgeAR BridgeAR closed this Mar 7, 2019
BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 19, 2019
This adds support to enforce a specific color depth by checking the
`FORCE_COLOR` environment variable similar to `chalk`.

On top of that we also add support for the `NO_COLOR` environment
variable as suggested by https://no-color.org/.

PR-URL: nodejs#26485
Refs: nodejs#26248
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
targos pushed a commit to targos/node that referenced this pull request Mar 27, 2019
This adds support to enforce a specific color depth by checking the
`FORCE_COLOR` environment variable similar to `chalk`.

On top of that we also add support for the `NO_COLOR` environment
variable as suggested by https://no-color.org/.

PR-URL: nodejs#26485
Refs: nodejs#26248
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
targos pushed a commit that referenced this pull request Mar 27, 2019
This adds support to enforce a specific color depth by checking the
`FORCE_COLOR` environment variable similar to `chalk`.

On top of that we also add support for the `NO_COLOR` environment
variable as suggested by https://no-color.org/.

PR-URL: #26485
Refs: #26248
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
@BridgeAR BridgeAR deleted the add-color-enforcing-docs branch January 20, 2020 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. tty Issues and PRs related to the tty subsystem. wip Issues and PRs that are still a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants