From 96b3f3f0aa7d6d284d7171fbc54171b056985709 Mon Sep 17 00:00:00 2001 From: Leroy Korterink Date: Fri, 3 Nov 2023 14:29:31 +0100 Subject: [PATCH] Rename package to @mediamonks/react-kit #257 --- .github/workflows/update-docs.yml | 2 +- README.md | 14 +++++++------- deploy-docs.sh | 2 +- package-lock.json | 4 ++-- package.json | 10 ++++++---- src/hooks/useMediaQuery/useMediaQuery.ts | 4 ++-- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 85564fc..87f0f3c 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -37,7 +37,7 @@ jobs: - name: Create artifact uses: actions/upload-pages-artifact@v1 with: - path: .docs/react-hooks/ + path: .docs/react-kit/ deploy: needs: build diff --git a/README.md b/README.md index 0b3445f..32e55db 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -[![npm version](https://img.shields.io/npm/v/@mediamonks/react-hooks)](https://www.npmjs.com/package/@mediamonks/react-hooks) -[![npm downloads](https://img.shields.io/npm/dm/@mediamonks/react-hooks)](https://www.npmjs.com/package/@mediamonks/react-hooks) +[![npm version](https://img.shields.io/npm/v/@mediamonks/react-kit)](https://www.npmjs.com/package/@mediamonks/react-kit) +[![npm downloads](https://img.shields.io/npm/dm/@mediamonks/react-kit)](https://www.npmjs.com/package/@mediamonks/react-kit) -# @mediamonks/react-hooks +# @mediamonks/react-kit Collection of commonly used React hooks. @@ -9,10 +9,10 @@ Collection of commonly used React hooks. ### Installing -Add `@mediamonks/react-hooks` to your project: +Add `@mediamonks/react-kit` to your project: ```sh -npm i @mediamonks/react-hooks +npm i @mediamonks/react-kit ``` ### Example @@ -20,7 +20,7 @@ npm i @mediamonks/react-hooks Use a hook inside a component: ```tsx -import { useToggle } from '@mediamonks/react-hooks'; +import { useToggle } from '@mediamonks/react-kit'; function DemoComponent() { const [state, toggle] = useToggle(false); @@ -36,7 +36,7 @@ function DemoComponent() { ## Docs -[https://mediamonks.github.io/react-hooks/](https://mediamonks.github.io/react-hooks/) +[https://mediamonks.github.io/react-kit/](https://mediamonks.github.io/react-kit/) ## Development diff --git a/deploy-docs.sh b/deploy-docs.sh index e5a3d70..bd8e003 100755 --- a/deploy-docs.sh +++ b/deploy-docs.sh @@ -19,6 +19,6 @@ git add -A git commit -m 'deploy' # if you are deploying to https://.github.io/ -git push -f git@github.com:mediamonks/react-hooks.git main:gh-pages +git push -f git@github.com:mediamonks/react-kit.git main:gh-pages cd - diff --git a/package-lock.json b/package-lock.json index d91bdb1..f2be30e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@mediamonks/react-hooks", + "name": "@mediamonks/react-kit", "version": "1.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "@mediamonks/react-hooks", + "name": "@mediamonks/react-kit", "version": "1.4.0", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index aace334..d2731d1 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,14 @@ { - "name": "@mediamonks/react-hooks", + "name": "@mediamonks/react-kit", "version": "1.4.0", - "description": "A collection of React hooks we use at Media.Monks", + "description": "A collection of React hooks, components, utilities that we use at Media.Monks", "keywords": [ "react", + "components", + "typescript", "hooks" ], - "repository": "git@github.com:mediamonks/react-hooks.git", + "repository": "git@github.com:mediamonks/react-kit.git", "author": "frontend.monks", "license": "MIT", "types": "./dist/index.d.ts", @@ -35,7 +37,7 @@ "test": "vitest ./src/", "check-types": "tsc --project tsconfig.json --noEmit --noUnusedLocals", "storybook": "storybook dev -p 6006", - "storybook:build": "storybook build -o ./.docs/react-hooks", + "storybook:build": "storybook build -o ./.docs/react-kit", "storybook:deploy": "./deploy-docs.sh", "prepublishOnly": "npm run build", "plop": "plop", diff --git a/src/hooks/useMediaQuery/useMediaQuery.ts b/src/hooks/useMediaQuery/useMediaQuery.ts index 7b0a050..4bbb7fe 100644 --- a/src/hooks/useMediaQuery/useMediaQuery.ts +++ b/src/hooks/useMediaQuery/useMediaQuery.ts @@ -9,9 +9,9 @@ import { useEventListener } from '../useEventListener/useEventListener.js'; * describe media queries in your project. * * @example - * import '@mediamonks/react-hooks'; + * import '@mediamonks/react-kit'; * - * declare module '@mediamonks/react-hooks' { + * declare module '@mediamonks/react-kit' { * interface MediaQueryVariables { * '--media-query-name': never; * }