From 11bec7ee3a1a9bfc48b66913924e3e79a78226d6 Mon Sep 17 00:00:00 2001 From: Jason Safaiyeh Date: Tue, 16 Feb 2021 22:10:11 -0800 Subject: [PATCH] feat(release): Update package name (#295) BREAKING CHANGE: Package renamed & published to @react-native-voice/voice --- README.md | 24 ++++++++++++------------ example/package.json | 2 +- example/src/VoiceTest.tsx | 2 +- package.json | 9 +++++---- react-native-voice.podspec | 2 +- 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index a02c46a..6ac49e4 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ alt="chat on Discord"> ```sh -yarn add @react-native-community/voice +yarn add @react-native-voice/voice # or -npm i @react-native-community/voice --save +npm i @react-native-voice/voice --save ``` Link the iOS package @@ -41,7 +41,7 @@ npx pod-install

Manually or automatically link the NativeModule

```sh -react-native link @react-native-community/voice +react-native link @react-native-voice/voice ``` ### Manually Link Android @@ -50,8 +50,8 @@ react-native link @react-native-community/voice ```gradle ... -include ':@react-native-community_voice', ':app' -project(':@react-native-community_voice').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/voice/android') +include ':@react-native-voice_voice', ':app' +project(':@react-native-voice_voice').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-voice/voice/android') ``` - In `android/app/build.gradle` @@ -60,7 +60,7 @@ project(':@react-native-community_voice').projectDir = new File(rootProject.proj ... dependencies { ... - compile project(':@react-native-community_voice') + compile project(':@react-native-voice_voice') } ``` @@ -89,18 +89,18 @@ public class MainActivity extends Activity implements ReactApplication { ### Manually Link iOS -- Drag the Voice.xcodeproj from the @react-native-community/voice/ios folder to the Libraries group on Xcode in your poject. [Manual linking](https://reactnative.dev/docs/linking-libraries-ios.html) +- Drag the Voice.xcodeproj from the @react-native-voice/voice/ios folder to the Libraries group on Xcode in your poject. [Manual linking](https://reactnative.dev/docs/linking-libraries-ios.html) - Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag the static library, lib.Voice.a, from the Libraries/Voice.xcodeproj/Products folder to Link Binary With Libraries

Usage

-

Full example for Android and iOS.

+

Full example for Android and iOS.

### Example ```javascript -import Voice from '@react-native-community/voice'; +import Voice from '@react-native-voice/voice'; import React, {Component} from 'react'; class VoiceTest extends Component { @@ -203,9 +203,9 @@ Need to include permissions for `NSMicrophoneUsageDescription` and `NSSpeechReco Please see the documentation provided by ReactNative for this: [PermissionsAndroid](https://reactnative.dev/docs/permissionsandroid.html) -[npm]: https://img.shields.io/npm/v/@react-native-community/voice.svg?style=flat-square -[npm-url]: https://npmjs.com/package/@react-native-community/voice -[circle-ci-badge]: https://img.shields.io/circleci/project/github/react-native-community/voice/master.svg?style=flat-square +[npm]: https://img.shields.io/npm/v/@react-native-voice/voice.svg?style=flat-square +[npm-url]: https://npmjs.com/package/@react-native-voice/voice +[circle-ci-badge]: https://img.shields.io/circleci/project/github/react-native-voice/voice/master.svg?style=flat-square

Contributors

diff --git a/example/package.json b/example/package.json index 59aa06d..450b36f 100644 --- a/example/package.json +++ b/example/package.json @@ -11,7 +11,7 @@ "dependencies": { "react": "16.9.0", "react-native": "0.61.5", - "@react-native-community/voice": "file:../" + "@react-native-voice/voice": "file:../" }, "devDependencies": { "@babel/core": "^7.6.2", diff --git a/example/src/VoiceTest.tsx b/example/src/VoiceTest.tsx index da30b85..1e79f47 100644 --- a/example/src/VoiceTest.tsx +++ b/example/src/VoiceTest.tsx @@ -11,7 +11,7 @@ import Voice, { SpeechRecognizedEvent, SpeechResultsEvent, SpeechErrorEvent, -} from '@react-native-community/voice'; +} from '@react-native-voice/voice'; type Props = {}; type State = { diff --git a/package.json b/package.json index e41d2ae..8ef2908 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { - "name": "@react-native-community/voice", + "name": "@react-native-voice/voice", "description": "React Native Native Voice library for iOS and Android", "version": "1.1.9", "author": "Sam Wenke ", - "homepage": "https://github.com/react-native-community/voice", + "private": false, + "homepage": "https://github.com/react-native-voice/voice", "devDependencies": { "@react-native-community/eslint-config": "^0.0.7", "@semantic-release/git": "^9.0.0", @@ -31,7 +32,7 @@ }, "repository": { "type": "git", - "url": "git://github.com/react-native-community/voice.git" + "url": "git://github.com/react-native-voice/voice.git" }, "scripts": { "lint": "eslint src/*", @@ -42,7 +43,7 @@ "prepare": "yarn build", "build": "tsc", "type-check": "tsc -noEmit", - "dev-sync": "cp -r ./dist example/node_modules/@react-native-community/voice" + "dev-sync": "cp -r ./dist example/node_modules/@react-native-voice/voice" }, "dependencies": { "invariant": "^2.2.4" diff --git a/react-native-voice.podspec b/react-native-voice.podspec index a326a9b..3d94d66 100644 --- a/react-native-voice.podspec +++ b/react-native-voice.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.homepage = package['homepage'] s.platform = :ios, "9.0" - s.source = { :git => "https://github.com/react-native-community/voice.git" } + s.source = { :git => "https://github.com/react-native-voice/voice.git" } s.source_files = "ios/**/*.{h,m}" s.dependency 'React'