Skip to content

Commit c6b20b3

Browse files
committed
Update API docs, tweak README shell commands
1 parent 3ed20ad commit c6b20b3

File tree

1 file changed

+50
-13
lines changed

1 file changed

+50
-13
lines changed

README.md

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Seamlessly shadows the behaviour of [`npm version`](https://docs.npmjs.com/cli/v
77
### Setup
88

99
```bash
10-
npm install react-native-version --save-dev
10+
$ npm install react-native-version --save-dev
1111
# or
12-
yarn add react-native-version --dev
12+
$ yarn add react-native-version --dev
1313
```
1414

1515
Hook into the "version" or "postversion" npm script in your app's package.json:
@@ -38,17 +38,17 @@ react-native-version will then update your `android/` and `ios/` code. Depending
3838
### Setup
3939

4040
```bash
41-
npm install -g react-native-version
41+
$ npm install -g react-native-version
4242
# or
43-
yarn global add react-native-version
43+
$ yarn global add react-native-version
4444
```
4545

4646
### Example usage
4747

4848
```bash
49-
cd AwesomeProject/
50-
npm version patch
51-
react-native-version
49+
$ cd AwesomeProject/
50+
$ npm version patch
51+
$ react-native-version
5252
```
5353

5454
## Options
@@ -85,15 +85,15 @@ You can apply these options to the "version" or "postversion" script too. If for
8585
The default behaviour is to version all React Native platforms. You can target specific platforms by passing a comma-separated list to the "--target" option, or by using the `RNV` environment variable:
8686

8787
```bash
88-
RNV=android,ios npm version patch
88+
$ RNV=android,ios npm version patch
8989
# or
90-
RNV=android,ios react-native-version
90+
$ RNV=android,ios react-native-version
9191
```
9292

9393
When using the CLI, you can even combine both methods and make your teammates rage :smiling_imp: :suspect::
9494

9595
```bash
96-
RNV=android react-native-version --target ios
96+
$ RNV=android react-native-version --target ios
9797
```
9898
:rage1: :speak_no_evil:
9999

@@ -123,7 +123,46 @@ version({
123123
});
124124
```
125125

126-
### Methods
126+
### Functions
127+
128+
<dl>
129+
<dt><a href="#getDefaults">getDefaults()</a> ⇒ <code>Object</code></dt>
130+
<dd><p>Returns default values for some options, namely android/ios file/folder paths</p>
131+
</dd>
132+
<dt><a href="#getPlistFilenames">getPlistFilenames(xcode)</a> ⇒ <code>Array</code></dt>
133+
<dd><p>Returns Info.plist filenames</p>
134+
</dd>
135+
<dt><a href="#version">version(program, projectPath)</a> ⇒ <code>Promise.&lt;(string|Error)&gt;</code></dt>
136+
<dd><p>Versions your app</p>
137+
</dd>
138+
</dl>
139+
140+
### Typedefs
141+
142+
<dl>
143+
<dt><a href="#Promise">Promise</a></dt>
144+
<dd><p>Custom type definition for Promises</p>
145+
</dd>
146+
</dl>
147+
148+
<a name="getDefaults"></a>
149+
150+
#### getDefaults() ⇒ <code>Object</code>
151+
Returns default values for some options, namely android/ios file/folder paths
152+
153+
**Kind**: global function
154+
**Returns**: <code>Object</code> - Defaults
155+
<a name="getPlistFilenames"></a>
156+
157+
#### getPlistFilenames(xcode) ⇒ <code>Array</code>
158+
Returns Info.plist filenames
159+
160+
**Kind**: global function
161+
**Returns**: <code>Array</code> - Plist filenames
162+
163+
| Param | Type | Description |
164+
| --- | --- | --- |
165+
| xcode | <code>Xcode</code> | Opened Xcode project file |
127166

128167
<a name="version"></a>
129168

@@ -138,8 +177,6 @@ Versions your app
138177
| program | <code>Object</code> | commander/CLI-style options, camelCased |
139178
| projectPath | <code>string</code> | Path to your React Native project |
140179

141-
### Types
142-
143180
<a name="Promise"></a>
144181

145182
#### Promise

0 commit comments

Comments
 (0)