Skip to content

Commit

Permalink
feat(release): Update package name (#295)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Package renamed & published to @react-native-voice/voice
  • Loading branch information
safaiyeh authored Feb 17, 2021
1 parent a65d223 commit ce8623c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
alt="chat on Discord"></a>

```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
Expand Down Expand Up @@ -41,7 +41,7 @@ npx pod-install
<p align="center">Manually or automatically link the NativeModule</p>

```sh
react-native link @react-native-community/voice
react-native link @react-native-voice/voice
```

### Manually Link Android
Expand All @@ -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`
Expand All @@ -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')
}
```

Expand Down Expand Up @@ -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

<h2 align="center">Usage</h2>

<p align="center"><a href="https://github.com/react-native-community/voice/tree/master/example/src/VoiceTest.js">Full example for Android and iOS.</a></p>
<p align="center"><a href="https://github.com/react-native-voice/voice/tree/master/example/src/VoiceTest.js">Full example for Android and iOS.</a></p>

### 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 {
Expand Down Expand Up @@ -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

<h2 align="center">Contributors</h2>

Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion example/src/VoiceTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Voice, {
SpeechRecognizedEvent,
SpeechResultsEvent,
SpeechErrorEvent,
} from '@react-native-community/voice';
} from '@react-native-voice/voice';

type Props = {};
type State = {
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"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",
Expand Down Expand Up @@ -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/*",
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion react-native-voice.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit ce8623c

Please sign in to comment.