Skip to content

Commit b1aba30

Browse files
committed
add codecov & badges
1 parent 926b2ee commit b1aba30

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/publish-to-npm-on-new-release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
npm version patch
2323
- name: Build and Test
2424
run: npm i && npm run build && npm run test
25+
- name: Upload coverage reports to Codecov
26+
uses: codecov/codecov-action@v3
27+
env:
28+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2529
- name: Publish to npm
2630
run: npm run publish-package
2731
env:

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# esbuild-react18-useclient
1+
# esbuild-react18-useclient [![Version](https://img.shields.io/npm/v/esbuild-react18-useclient.svg?colorB=green)](https://www.npmjs.com/package/esbuild-react18-useclient) [![Downloads](https://img.jsdelivr.com/img.shields.io/npm/dt/esbuild-react18-useclient.svg)](https://www.npmjs.com/package/esbuild-react18-useclient) [![Publish to npm and GitHub](https://github.com/mayank1513/esbuild-react18-useclient/actions/workflows/publish-to-npm-on-new-release.yml/badge.svg)](https://github.com/mayank1513/esbuild-react18-useclient/actions/workflows/publish-to-npm-on-new-release.yml)
22

33
<img src="https://github.com/mayank1513/esbuild-react18-useclient/blob/main/esbuild-react18.jpg?raw=true" title="Build Awesome Libraries using React Server Components and make your Mark!" style="width:100%"/>
44

55
> Build Awesome Libraries using React Server Components and make your Mark!
66
77
This is an `esbuild` plugin for compiling libraries compatible with React 18 server and client component, Nextjs13, Remix, etc.
88

9-
## Why?
9+
## Why?
1010

1111
- Unleash the power of combining react client and server components in your libraries
1212
- TypeScript out of the box
@@ -15,9 +15,13 @@ This is an `esbuild` plugin for compiling libraries compatible with React 18 ser
1515

1616
Introduction of React server components in React 18 has unlocked immense possibilities. However, library authors are not yet able to fully encash upon this potential. Many libraries, like `chakra-ui`, simply add “use client” for each component. However, much more can be unleashed when we can use both server and client components to build libraries. Also check-out this [blog](https://mayank1513.medium.com/unleash-the-power-of-react-server-components-eb3fe7201231).
1717

18+
## Example
19+
20+
Checkout https://github.com/mayank1513/nextjs-themes
21+
1822
## Compatibility
1923

20-
- JavaScript/TypeScript React libraries using `tsup` or other builders based on `esbuild`
24+
- JavaScript/TypeScript React libraries using `tsup` or other builders based on `esbuild`
2125

2226
This plugin seamlessly integrates with `tsup` and any other builders based on `esbuild`. With this you can have both server and client components in your library and the plugin will take care of the rest. All you need to do is add this plugin and add `"use client";` on top of client components (in your source code).
2327

0 commit comments

Comments
 (0)