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

Add minimum browser support #10

Merged
merged 2 commits into from
Sep 27, 2021
Merged

Add minimum browser support #10

merged 2 commits into from
Sep 27, 2021

Conversation

alexeyraspopov
Copy link
Owner

Per #1, there are cases where a node module can be bundled to be used in browser environment. The lib uses tty node module which is not accessible in browsers and there simply not so much the lib can do to make text in browsers colored. Thus, we introduce stubs, that make it possible to bundle the lib without any issues.

I explicitly made it so the code in stubs is "minified". We're not going to update these files often (ever?) so no need to format them properly. This should shove off some bytes from the NPM package.

@alexeyraspopov alexeyraspopov merged commit 1d84d76 into main Sep 27, 2021
@alexeyraspopov alexeyraspopov deleted the feature/BrowserSupport branch September 27, 2021 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants