uws-react-native 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -9,6 +9,10 @@ The port of [**uWebSockets**](https://github.com/uNetworking/uWebSockets) librar
|
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
|
+
We provide two registry homes where this library lives which can be used for your project. You can use either it's from NPM registry or GitHub Packages
|
|
13
|
+
|
|
14
|
+
### From NPM Registry
|
|
15
|
+
|
|
12
16
|
npm
|
|
13
17
|
```
|
|
14
18
|
npm install uws-react-native
|
|
@@ -24,6 +28,41 @@ pnpm
|
|
|
24
28
|
pnpm install uws-react-native
|
|
25
29
|
```
|
|
26
30
|
|
|
31
|
+
### From GitHub Packages
|
|
32
|
+
|
|
33
|
+
First, create your GitHub personal token (classic) with `read:packages` access
|
|
34
|
+
> **Skip if you already have it**
|
|
35
|
+
1. In the upper-right corner of any page on GitHub, click your profile picture, then click Settings
|
|
36
|
+
2. In the left sidebar, click **<> Developer settings**
|
|
37
|
+
3. In the left sidebar, under **🔑 Personal access tokens**, click **Tokens (classic)**
|
|
38
|
+
4. Select Generate new token, then click **Generate new token (classic)**
|
|
39
|
+
5. Fill your descriptive note, fill / check the `read:packages` access, and click **Generate token**
|
|
40
|
+
6. Copy the generated token, or save it to somewhere else
|
|
41
|
+
|
|
42
|
+
After that, in the same directory as your `package.json` file, create or edit an `.npmrc` file with this snippet
|
|
43
|
+
```
|
|
44
|
+
@rakadoank:registry=https://npm.pkg.github.com
|
|
45
|
+
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PERSONAL_TOKEN
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Finally, do the regular installation with the CLI, but with the scope name
|
|
49
|
+
|
|
50
|
+
npm
|
|
51
|
+
```
|
|
52
|
+
npm install @rakadoank/uws-react-native
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
yarn
|
|
56
|
+
```
|
|
57
|
+
yarn add @rakadoank/uws-react-native
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
pnpm
|
|
61
|
+
```
|
|
62
|
+
pnpm install @rakadoank/uws-react-native
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
|
|
27
66
|
## Usage
|
|
28
67
|
|
|
29
68
|
Since uws-react-native is a port of uWebSockets library for JavaScript, this library is really similar of how to use the [uWebSockets](https://github.com/uNetworking/uWebSockets) in C++, or the [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js) for Node.js.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uws-react-native",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "The port of uWebSockets library for React Native",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
6
|
"author": "RakaDoank <rakaaudira@gmail.com> (https://github.com/RakaDoank)",
|
|
7
7
|
"homepage": "https://github.com/RakaDoank/uws-react-native",
|
|
8
8
|
"repository": {
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
"!android/local.properties",
|
|
36
36
|
"!ios/build"
|
|
37
37
|
],
|
|
38
|
+
"main": "./lib/module/index.js",
|
|
39
|
+
"types": "./lib/typescript/module/index.d.ts",
|
|
38
40
|
"exports": {
|
|
39
41
|
".": {
|
|
40
42
|
"import": {
|