From cdef0ce630b3e824aee0f8517d8282ff51dbbe3f Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 11 Feb 2023 22:34:16 +0200 Subject: [PATCH] readme update and @flare/tuitio-client update --- README.md | 19 ++++++++++++++----- package-lock.json | 14 +++++++------- package.json | 2 +- src/index.ts | 2 ++ 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index b802f89..d4d10b2 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Tuitio client +# Tuitio react client ## Introduction Tuitio react client is an npm package written in typescript that facilitates the integration of a react application with [Tuitio](https://lab.code-rove.com/gitea/tudor.stanciu/tuitio). -This package uses [tuitio-client](https://lab.code-rove.com/gitea/bricks/tuitio-client#readme) internally and adds state management through a react context and various react hooks through which the user has access to data and actions. +This package uses [tuitio-client](https://lab.code-rove.com/gitea/bricks/tuitio-client#readme) internally and adds state management through react contexts and various react hooks through which the user has access to data and actions. ## Package installation @@ -15,12 +15,21 @@ The package installation can be done in two ways: ## How to use the package -TO DO +```javascript! +const { TuitioProvider, useTuitioClient, useTuitioUser, useTuitioToken } = require("@flare/tuitio-react-client"); +const TuitioProvider = require("@flare/tuitio-react-client"); + +``` + +```javascript! +import { TuitioProvider, useTuitioClient, useTuitioUser, useTuitioToken } from "@flare/tuitio-react-client"; +import TuitioProvider from "@flare/tuitio-react-client"; +``` ## Unit testing -Unit testing is done using [Jest](https://jestjs.io/). This is an awesome testing framework created by Facebook. -The files containing tests are identified by the extension `*.test.ts`. +Unit testing is done using [Jest](https://jestjs.io/). This is an awesome testing framework created by Facebook. +The files containing tests are identified by the extension `*.test.ts`. All tests in the package can be executed by running: `npm test`. ## Changelog diff --git a/package-lock.json b/package-lock.json index 9fbb02e..d55f50b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@flare/tuitio-client": "^1.0.2" + "@flare/tuitio-client": "^1.0.3" }, "devDependencies": { "@testing-library/react": "^12.1.5", @@ -706,9 +706,9 @@ "integrity": "sha512-VgXQHoQEVZ/71B6YQHQP8/Yd/w1smGD+kCCiNvJKZ1xMD3nkN9mjoHxIqbOJMZ2q5PZlV6gXYT7eVol8Wm+D0A==" }, "node_modules/@flare/tuitio-client": { - "version": "1.0.2", - "resolved": "https://lab.code-rove.com/public-node-registry/@flare/tuitio-client/-/tuitio-client-1.0.2.tgz", - "integrity": "sha512-USpnUfZ36RiTg2UTVRvW5+FT3c8UuXjTbIe02GLLKImjF4ZV27Rz9nn7UaVtkQLt9YyxNBYokGKekKl+WVRG0Q==", + "version": "1.0.3", + "resolved": "https://lab.code-rove.com/public-node-registry/@flare/tuitio-client/-/tuitio-client-1.0.3.tgz", + "integrity": "sha512-XlNje3e985ruGtJaKUZLY6kRsgcPG0UhoYZfWjDnAsaoC15rbHc+RF3iBOO42Z7eMPDm00UYu54NiqOagu9geg==", "dependencies": { "@flare/js-utils": "^1.0.3", "axios": "^1.3.2" @@ -7337,9 +7337,9 @@ "integrity": "sha512-VgXQHoQEVZ/71B6YQHQP8/Yd/w1smGD+kCCiNvJKZ1xMD3nkN9mjoHxIqbOJMZ2q5PZlV6gXYT7eVol8Wm+D0A==" }, "@flare/tuitio-client": { - "version": "1.0.2", - "resolved": "https://lab.code-rove.com/public-node-registry/@flare/tuitio-client/-/tuitio-client-1.0.2.tgz", - "integrity": "sha512-USpnUfZ36RiTg2UTVRvW5+FT3c8UuXjTbIe02GLLKImjF4ZV27Rz9nn7UaVtkQLt9YyxNBYokGKekKl+WVRG0Q==", + "version": "1.0.3", + "resolved": "https://lab.code-rove.com/public-node-registry/@flare/tuitio-client/-/tuitio-client-1.0.3.tgz", + "integrity": "sha512-XlNje3e985ruGtJaKUZLY6kRsgcPG0UhoYZfWjDnAsaoC15rbHc+RF3iBOO42Z7eMPDm00UYu54NiqOagu9geg==", "requires": { "@flare/js-utils": "^1.0.3", "axios": "^1.3.2" diff --git a/package.json b/package.json index 61eb616..21cac5e 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "README.md" ], "dependencies": { - "@flare/tuitio-client": "^1.0.2" + "@flare/tuitio-client": "^1.0.3" }, "peerDependencies": { "react": "^16.14.0" diff --git a/src/index.ts b/src/index.ts index bd62bcd..1e58f45 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,5 @@ import TuitioProvider from "./TuitioProvider"; +export * from "./hooks"; +export { TuitioProvider }; export default TuitioProvider;