From 5164b67c49c3d62ac313a9bd7a90deed7138ff80 Mon Sep 17 00:00:00 2001 From: sohantalukder Date: Tue, 7 Jan 2025 10:09:46 +0600 Subject: [PATCH] publish package --- CONTRIBUTING.md | 4 ++-- ReadMe.md | 14 +++++++------- example/package.json | 2 +- example/src/App.tsx | 2 +- package.json | 21 ++++++++++++++------- rn-phone-input.podspec | 4 ++-- tsconfig.json | 2 +- yarn.lock | 8 ++++---- 8 files changed, 32 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6d43a2d..ba42ed0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,9 +23,9 @@ The [example app](/example/) demonstrates usage of the library. You need to run It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app. -If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/RnPhoneInputExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > rn-phone-input`. +If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/RnPhoneInputExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > rn-phone-input-2`. -To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `rn-phone-input` under `Android`. +To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `rn-phone-input-2` under `Android`. You can use various commands from the root directory to work with the project. diff --git a/ReadMe.md b/ReadMe.md index e011a79..ac75ae3 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,25 +1,25 @@ -# rn-phone-input +# rn-phone-input-2 -`rn-phone-input` is a React Native component for a customizable phone number input with country code selection and validation. +`rn-phone-input-2` is a React Native component for a customizable phone number input with country code selection and validation. ## Description -`rn-phone-input` provides an intuitive and user-friendly way to input and validate phone numbers in React Native applications. It supports automatic country code detection, customizable styles, and additional features to ensure seamless integration into your project. +`rn-phone-input-2` provides an intuitive and user-friendly way to input and validate phone numbers in React Native applications. It supports automatic country code detection, customizable styles, and additional features to ensure seamless integration into your project. ## Installation -You can install `rn-phone-input` using either npm or yarn: +You can install `rn-phone-input-2` using either npm or yarn: ### Using npm: ```bash -npm install rn-phone-input +npm install rn-phone-input-2 ``` ### Using yarn: ```bash -yarn add rn-phone-input +yarn add rn-phone-input-2 ``` ## Usage @@ -29,7 +29,7 @@ Here's an example of how to use the `RNPhoneInput` component: ```javascript import React from 'react'; import { View } from 'react-native'; -import RNPhoneInput from 'rn-phone-input'; +import RNPhoneInput from 'rn-phone-input-2'; const MyComponent = () => { return ( diff --git a/example/package.json b/example/package.json index 3b35c17..d1e6686 100644 --- a/example/package.json +++ b/example/package.json @@ -1,5 +1,5 @@ { - "name": "rn-phone-input-example", + "name": "rn-phone-input-2-example", "version": "0.0.1", "private": true, "scripts": { diff --git a/example/src/App.tsx b/example/src/App.tsx index e94e542..ceedf75 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { View } from 'react-native'; -import RNPhoneInput from 'rn-phone-input'; +import RNPhoneInput from 'rn-phone-input-2'; const App: React.FC = () => { return ( diff --git a/package.json b/package.json index c15dc06..60b0a47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "rn-phone-input", - "version": "0.1.0", + "name": "rn-phone-input-2", + "version": "0.1.2", "description": "A React Native phone number input component built from scratch, featuring a text input for number entry, a custom dropdown for selecting country codes, and validation logic using regex or country-specific rules. It supports formatting, localization, and styling, ensuring a seamless and accessible user experience without relying on external libraries.", "source": "./src/index.tsx", "main": "./lib/commonjs/index.js", @@ -37,7 +37,7 @@ "!**/.*" ], "scripts": { - "example": "yarn workspace rn-phone-input-example", + "example": "yarn workspace rn-phone-input-2-example", "test": "jest", "typecheck": "tsc", "lint": "eslint \"**/*.{js,ts,tsx}\"", @@ -48,18 +48,25 @@ "keywords": [ "react-native", "ios", - "android" + "android", + "phone", + "input", + "dropdown", + "phone-number-input", + "phone-number-dropdown", + "react-native-phone-input", + "react-native-phone-number-input" ], "repository": { "type": "git", - "url": "git+https://github.com/sohantalukder/rn-phone-input.git" + "url": "git+https://github.com/sohantalukder/rn-phone-input-2.git" }, "author": "Md. Sohan Talukder (https://github.com/sohantalukder)", "license": "MIT", "bugs": { - "url": "https://github.com/sohantalukder/rn-phone-input/issues" + "url": "https://github.com/sohantalukder/rn-phone-input-2/issues" }, - "homepage": "https://github.com/sohantalukder/rn-phone-input#readme", + "homepage": "https://github.com/sohantalukder/rn-phone-input-2#readme", "publishConfig": { "registry": "https://registry.npmjs.org/" }, diff --git a/rn-phone-input.podspec b/rn-phone-input.podspec index 409117e..749eed4 100644 --- a/rn-phone-input.podspec +++ b/rn-phone-input.podspec @@ -4,7 +4,7 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json"))) folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' Pod::Spec.new do |s| - s.name = "rn-phone-input" + s.name = "rn-phone-input-2" s.version = package["version"] s.summary = package["description"] s.homepage = package["homepage"] @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.authors = package["author"] s.platforms = { :ios => min_ios_version_supported } - s.source = { :git => "https://github.com/sohantalukder/rn-phone-input.git", :tag => "#{s.version}" } + s.source = { :git => "https://github.com/sohantalukder/rn-phone-input-2.git", :tag => "#{s.version}" } s.source_files = "ios/**/*.{h,m,mm,cpp}" diff --git a/tsconfig.json b/tsconfig.json index e7dbad4..53d4a7e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "rootDir": ".", "paths": { - "rn-phone-input": ["./src/index"] + "rn-phone-input-2": ["./src/index"] }, "allowUnreachableCode": false, "allowUnusedLabels": false, diff --git a/yarn.lock b/yarn.lock index ba9f042..59e4338 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11194,9 +11194,9 @@ __metadata: languageName: node linkType: hard -"rn-phone-input-example@workspace:example": +"rn-phone-input-2-example@workspace:example": version: 0.0.0-use.local - resolution: "rn-phone-input-example@workspace:example" + resolution: "rn-phone-input-2-example@workspace:example" dependencies: "@babel/core": ^7.25.2 "@babel/preset-env": ^7.25.3 @@ -11213,9 +11213,9 @@ __metadata: languageName: unknown linkType: soft -"rn-phone-input@workspace:.": +"rn-phone-input-2@workspace:.": version: 0.0.0-use.local - resolution: "rn-phone-input@workspace:." + resolution: "rn-phone-input-2@workspace:." dependencies: "@commitlint/config-conventional": ^17.0.2 "@evilmartians/lefthook": ^1.5.0