From 348ad9d0d62277153c9d5ab070c8312ab659e5ff Mon Sep 17 00:00:00 2001 From: Luis Marsiglia Date: Sun, 16 Oct 2022 20:41:18 -0400 Subject: [PATCH] fix: rename package name --- README.md | 50 +++++++++---------- package.json | 2 +- packages/example/package.json | 2 +- packages/example/src/components/Demo.tsx | 2 +- packages/example/src/components/Footer.tsx | 2 +- .../example/src/components/WidgetMethods.tsx | 2 +- pnpm-lock.yaml | 4 +- 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 2b91d1c..3d89558 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,13 @@ https://react-turnstile.vercel.app/ ## Install 1. First, [follow these steps](https://developers.cloudflare.com/turnstile/get-started/) to obtain a free site key and secret key from Cloudflare. -2. Install `react.turnstile` into your React application. +2. Install `@marsidev/react-turnstile` into your React application. ```bash # Whichever matches your package manager - pnpm add react.turnstile - npm install react.turnstile - yarn add react.turnstile + pnpm add @marsidev/react-turnstile + npm install @marsidev/react-turnstile + yarn add @marsidev/react-turnstile ``` ## Usage @@ -34,9 +34,9 @@ https://react-turnstile.vercel.app/ The only required prop is the `siteKey`. ```jsx -import { Turnstile } from 'react.turnstile' +import { Turnstile } from '@marsidev/react-turnstile' -function TurnstileWidget() { +function Widget() { return } ``` @@ -81,18 +81,18 @@ function TurnstileWidget() { ### Rendering the widget: ```jsx -import { Turnstile } from 'react.turnstile' +import { Turnstile } from '@marsidev/react-turnstile' -function TurnstileWidget() { +function Widget() { return } ``` ### Rendering the widget with custom props: ```jsx -import { Turnstile } from 'react.turnstile' +import { Turnstile } from '@marsidev/react-turnstile' -function TurnstileWidget() { +function Widget() { return ( (null) return ( @@ -201,7 +201,7 @@ function TurnstileWidget() { ```jsx // LoginForm.jsx import { useRef, useState } from 'react' -import { Turnstile } from 'react.turnstile' +import { Turnstile } from '@marsidev/react-turnstile' export default function LoginForm() { const formRef = useRef(null) @@ -295,15 +295,15 @@ Published under the [MIT License](./LICENCE). -[npm-version-src]: https://badgen.net/npm/v/react.turnstile?style=flat-square -[npm-version-href]: https://npm.im/react.turnstile -[npm-downloads-src]: https://badgen.net/npm/dm/react.turnstile?style=flat-square -[npm-downloads-href]: https://npm.im/react.turnstile +[npm-version-src]: https://badgen.net/npm/v/@marsidev/react-turnstile?style=flat-square +[npm-version-href]: https://npm.im/@marsidev/react-turnstile +[npm-downloads-src]: https://badgen.net/npm/dm/@marsidev/react-turnstile?style=flat-square +[npm-downloads-href]: https://npm.im/@marsidev/react-turnstile -[packagephobia-src]: https://packagephobia.com/badge?p=react.turnstile -[packagephobia-href]: https://packagephobia.com/result?p=react.turnstile +[packagephobia-src]: https://packagephobia.com/badge?p=@marsidev/react-turnstile +[packagephobia-href]: https://packagephobia.com/result?p=@marsidev/react-turnstile [prs-src]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square [tests-src]: https://img.shields.io/badge/Tests-missing-red.svg?style=flat-square diff --git a/package.json b/package.json index d25c9fa..deb74bd 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "react.turnstile", + "name": "@marsidev/react-turnstile", "version": "0.0.1", "packageManager": "pnpm@7.12.1", "description": "Cloudflare Turnstile integration for React.", diff --git a/packages/example/package.json b/packages/example/package.json index aa99406..5f5cf19 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -15,7 +15,7 @@ "next": "12.3.1", "react": "18.2.0", "react-dom": "18.2.0", - "react.turnstile": "workspace:*" + "@marsidev/react-turnstile": "workspace:*" }, "devDependencies": { "@types/node": "18.11.0", diff --git a/packages/example/src/components/Demo.tsx b/packages/example/src/components/Demo.tsx index 6a61a48..2c5d0b7 100644 --- a/packages/example/src/components/Demo.tsx +++ b/packages/example/src/components/Demo.tsx @@ -1,5 +1,5 @@ import { useEffect, useRef, useState } from 'react' -import { Turnstile, type TurnstileInstance } from 'react.turnstile' +import { Turnstile, type TurnstileInstance } from '@marsidev/react-turnstile' import ConfigForm from './ConfigForm' import StateLabels from './StateLabels' import WidgetMethods from './WidgetMethods' diff --git a/packages/example/src/components/Footer.tsx b/packages/example/src/components/Footer.tsx index 30eb873..87a81cc 100644 --- a/packages/example/src/components/Footer.tsx +++ b/packages/example/src/components/Footer.tsx @@ -4,7 +4,7 @@ const Footer = () => { return (