Merged PR 92: Rebranded the package from `react-hooks` to `lumrop`.

master
Tudor Stanciu 2025-04-15 22:16:29 +00:00
parent 1f21f4483d
commit 87499720b0
3 changed files with 65 additions and 28 deletions

View File

@ -1,34 +1,71 @@
# react-hooks # lumrop
## Introduction ## Introduction
**react-hooks** is an npm package that brings together multiple react hooks useful both in the development of the ecosystem in my home lab and for the general public. **lumrop** is a versatile npm package that provides a collection of React components, hooks, and utilities designed to simplify and enhance development within the React ecosystem. Whether you're working on personal projects or building for the public, **lumrop** offers tools to streamline your workflow.
## Package installation ## Installation
Install the package using npm or yarn:
```bash ```bash
// with npm # with npm
npm i --save @flare/react-hooks --registry https://lab.code-rove.com/public-node-registry npm install @flare/lumrop --registry https://lab.code-rove.com/public-node-registry
// with yarn # with yarn
yarn add @flare/react-hooks --registry https://lab.code-rove.com/public-node-registry yarn add @flare/lumrop --registry https://lab.code-rove.com/public-node-registry
``` ```
## How to use the package ## Usage
Import and use the provided hooks and utilities in your React project:
```jsx ```jsx
import { useWindowSize, useLink, useTitle } from "@flare/react-hooks"; import { useWindowSize, useLink, useTitle } from "@flare/lumrop";
// Example usage
function App() {
const { width, height } = useWindowSize();
useTitle("Welcome to Lumrop");
return (
<div>
<h1>
Window Size: {width}x{height}
</h1>
</div>
);
}
``` ```
## Unit testing ## Unit Testing
Unit testing is done using [Jest](https://jestjs.io/). This is an awesome testing framework created by Facebook. Unit tests are written using [Jest](https://jestjs.io/), a powerful testing framework by Facebook.
The files containing tests are identified by the extension `*.test.ts`. Test files are identified by the `*.test.ts` extension. To run all tests, use the following command:
All tests in the package can be executed by running: `npm test`.
```bash
npm test
```
## Changelog ## Changelog
**1.0.0** - This version includes the initial version of react-hooks package. ### v1.2.0
**1.0.1** - Small changes related to appearance (domain and readme updates).
**1.1.0** - The project was migrated to TypeScript, and unit testing using Jest was added to it. - Rebranded the package from `react-hooks` to `lumrop`.
**1.1.1** - Include the `src` directory in the npm package.
### v1.1.1
- Included the `src` directory in the npm package.
### v1.1.0
- Migrated the project to TypeScript.
- Added unit testing with Jest.
### v1.0.1
- Minor updates to the domain and README.
### v1.0.0
- Initial release of the `react-hooks` package.

8
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@flare/react-hooks", "name": "@flare/lumrop",
"version": "1.1.1", "version": "1.2.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@flare/react-hooks", "name": "@flare/lumrop",
"version": "1.1.1", "version": "1.2.0",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@testing-library/react": "^12.1.5", "@testing-library/react": "^12.1.5",

View File

@ -1,7 +1,7 @@
{ {
"name": "@flare/react-hooks", "name": "@flare/lumrop",
"version": "1.1.1", "version": "1.2.0",
"description": "react-hooks is an npm package that brings together multiple react hooks useful both in the development of the ecosystem in my home lab and for the general public.", "description": "lumrop is an npm package that brings together multiple react hooks useful both in the development of the ecosystem in my home lab and for the general public.",
"main": "./dist/cjs/index.js", "main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js", "module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts", "types": "./dist/esm/index.d.ts",
@ -26,11 +26,11 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://lab.code-rove.com/gitea/bricks/react-hooks" "url": "https://lab.code-rove.com/gitea/bricks/lumrop"
}, },
"keywords": [ "keywords": [
"flare", "flare",
"react-hooks" "lumrop"
], ],
"author": { "author": {
"name": "Tudor Stanciu", "name": "Tudor Stanciu",
@ -39,9 +39,9 @@
}, },
"license": "MIT", "license": "MIT",
"bugs": { "bugs": {
"url": "https://lab.code-rove.com/gitea/bricks/react-hooks/issues" "url": "https://lab.code-rove.com/gitea/bricks/lumrop/issues"
}, },
"homepage": "https://lab.code-rove.com/gitea/bricks/react-hooks#readme", "homepage": "https://lab.code-rove.com/gitea/bricks/lumrop#readme",
"files": [ "files": [
"dist", "dist",
"src", "src",