Skip to content

Commit

Permalink
publish package
Browse files Browse the repository at this point in the history
  • Loading branch information
sohantalukder committed Jan 7, 2025
1 parent 8ecb9b8 commit 5164b67
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 25 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
14 changes: 7 additions & 7 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "rn-phone-input-example",
"name": "rn-phone-input-2-example",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
21 changes: 14 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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}\"",
Expand All @@ -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 <mdtalukder.sohan@gmail.com> (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/"
},
Expand Down
4 changes: 2 additions & 2 deletions rn-phone-input.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ 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"]
s.license = package["license"]
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}"

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"rootDir": ".",
"paths": {
"rn-phone-input": ["./src/index"]
"rn-phone-input-2": ["./src/index"]
},
"allowUnreachableCode": false,
"allowUnusedLabels": false,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5164b67

Please sign in to comment.