-
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1318 from capricorn86/1317-add-sponsors-to-readmemd
chore: [#1317] Improves documentation and adds sponsors to README.md
- Loading branch information
Showing
4 changed files
with
100 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,64 @@ | ||
![Happy DOM Logo](https://github.com/capricorn86/happy-dom/raw/master/docs/happy-dom-logo.jpg) | ||
|
||
# About | ||
<h1 align="center"> | ||
<img alt="Happy DOM Logo" src="https://github.com/capricorn86/happy-dom/raw/master/docs/happy-dom-logo.jpg" /> | ||
</h1> | ||
<p align="center"> | ||
A JavaScript implementation of a web browser without its graphical user interface. | ||
</p> | ||
|
||
[Happy DOM](https://github.com/capricorn86/happy-dom) is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG [DOM](https://dom.spec.whatwg.org/) and [HTML](https://html.spec.whatwg.org/multipage/). | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/happy-dom"> | ||
<img alt="Published on NPM" src="https://img.shields.io/npm/v/happy-dom.svg"> | ||
</a> | ||
</p> | ||
|
||
The goal of [Happy DOM](https://github.com/capricorn86/happy-dom) is to emulate enough of a web browser to be useful for testing, scraping web sites and server-side rendering. | ||
<p align="center"> | ||
<a href="https://github.com/capricorn86/happy-dom/wiki/">Documentation</a> | <a href="https://github.com/capricorn86/happy-dom/wiki/Getting-started">Getting started</a> | <a href="https://github.com/capricorn86/happy-dom/wiki/Setup-as-Test-Environment">Setup as Test Environment</a> | ||
</p> | ||
|
||
[Happy DOM](https://github.com/capricorn86/happy-dom) focuses heavily on performance and can be used as an alternative to [JSDOM](https://github.com/jsdom/jsdom). | ||
## DOM Features | ||
|
||
### DOM Features | ||
- Custom Elements (Web Components) | ||
|
||
- Custom Elements (Web Components) | ||
- Declarative Shadow DOM | ||
|
||
- Shadow Root (Shadow DOM) | ||
- Mutation Observer | ||
|
||
- Declarative Shadow DOM | ||
- Tree Walker | ||
|
||
- Mutation Observer | ||
|
||
- Tree Walker | ||
|
||
- Fetch | ||
- Fetch API | ||
|
||
And much more.. | ||
|
||
### Works With | ||
|
||
- [Google LitHTML](https://lit-html.polymer-project.org) | ||
|
||
- [Google LitElement](https://lit-element.polymer-project.org) | ||
|
||
- [React](https://reactjs.org) | ||
|
||
- [Angular](https://angular.io/) | ||
|
||
- [Vue](https://vuejs.org/) | ||
|
||
### Module Systems | ||
|
||
- [ESM](https://nodejs.org/api/esm.html#introduction) | ||
- [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules) | ||
## Works With | ||
|
||
# Documentation | ||
- [Vitest](https://vitest.dev/) | ||
- [Bun](https://bun.sh) | ||
- [Jest](https://jestjs.io/) | ||
- [Testing Library](https://testing-library.com/) | ||
- [React](https://reactjs.org) | ||
- [Vue](https://vuejs.org/) | ||
- [Angular](https://angular.io/) | ||
- [Google LitElement](https://lit.dev/) | ||
|
||
Read more about how to use Happy DOM in our [Wiki](https://github.com/capricorn86/happy-dom/wiki). | ||
## Sponsors | ||
|
||
# Packages | ||
<p align="center"><b>Gold Sponsors</b></p> | ||
|
||
This repository is a _Monorepo_. Each package lives under `packages/<package>`. | ||
<p align="center"><a href="https://rtvision.com"><img alt="RTVision" width="120px" src="https://avatars.githubusercontent.com/u/8292810?s=200&v=4"></a></p> | ||
|
||
### [![Published on npm](https://img.shields.io/npm/v/happy-dom.svg)](https://www.npmjs.com/package/happy-dom) [happy-dom](https://github.com/capricorn86/happy-dom/tree/master/packages/happy-dom) | ||
<p align="center"><b>Sponsors</b></p> | ||
|
||
This package contains the core functionality of Happy DOM. | ||
<p align="center"><a href="https://sentry.io/"><img alt="Sentry" width="50px" src="https://avatars.githubusercontent.com/u/1396951?s=200&v=4"></a></p> | ||
|
||
--- | ||
<p align="center"><b>Backers</b></p> | ||
|
||
### [![Published on npm](https://img.shields.io/npm/v/@happy-dom/jest-environment.svg)](https://www.npmjs.com/package/@happy-dom/jest-environment) [jest-environment](https://github.com/capricorn86/happy-dom/tree/master/packages/jest-environment) | ||
<p align="center"><a href="https://github.com/maxmilton"><img alt="Github user @maxmilton" src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/14946546?v=4&h=40&w=40&fit=cover&mask=circle&maxage=7d"></a> <a href="https://github.com/taufiq-dev"><img alt="Github user @taufiq-dev" src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/20721306?v=4&h=40&w=40&fit=cover&mask=circle&maxage=7d"></a></p> | ||
|
||
This package makes it possible to use Happy DOM with [Jest](https://jestjs.io/). | ||
|
||
--- | ||
|
||
### [![Published on npm](https://img.shields.io/npm/v/@happy-dom/global-registrator.svg)](https://www.npmjs.com/package/@happy-dom/global-registrator) [global-registrator](https://github.com/capricorn86/happy-dom/tree/master/packages/global-registrator) | ||
|
||
A utility that registers Happy DOM globally, which makes it possible to use Happy DOM for testing in a Node environment. | ||
|
||
# Performance | ||
|
||
| Operation | JSDOM | Happy DOM | | ||
| ------------------------------------ | ------- | --------- | | ||
| Import / Require | 333 ms | 45 ms | | ||
| Parse HTML | 256 ms | 26 ms | | ||
| Serialize HTML | 65 ms | 8 ms | | ||
| Render custom element | 214 ms | 19 ms | | ||
| querySelectorAll('tagname') | 4.9 ms | 0.7 ms | | ||
| querySelectorAll('.class') | 6.4 ms | 3.7 ms | | ||
| querySelectorAll('[attribute]') | 4.0 ms | 1.7 ms | | ||
| querySelectorAll('[class~="name"]') | 5.5 ms | 2.9 ms | | ||
| querySelectorAll(':nth-child(2n+1)') | 10.4 ms | 3.8 ms | | ||
|
||
See how the test was done [here](https://github.com/capricorn86/happy-dom-performance-test) | ||
|
||
# Contributing | ||
## Contributing | ||
|
||
See [Contributing Guide](https://github.com/capricorn86/happy-dom/blob/master/docs/contributing.md). | ||
|
||
# Sister Projects | ||
|
||
[<img alt="Happy Conventional Commit" width="120px" src="https://raw.githubusercontent.com/capricorn86/happy-conventional-commit/main/docs/logo_thumbnail.jpg" />](https://github.com/capricorn86/happy-conventional-commit) | ||
|
||
# Sponsors | ||
## License | ||
|
||
[<img alt="RTVision" width="120px" src="https://avatars.githubusercontent.com/u/8292810?s=200&v=4" />](https://rtvision.com) | ||
MIT License © 2020-Present [David Ortner](https://github.com/capricorn86) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.