Skip to content

Commit 3bcb49f

Browse files
author
Vlad
committed
Replace rnpm postlink with rn-config.js and update README.md
1 parent 697ed2c commit 3bcb49f

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

README.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ Exposes `addEvent` method which can save an event to an Android or iOS device's
1212

1313
Run `npm install --save git+ssh://git@bitbucket.org:fiveminutes/react-native-calendar-manager.git`
1414

15-
### Automatic plugin linking using rnpm
15+
### Linking
1616

17-
You can use [`rnpm`](https://github.com/rnpm/rnpm) to add native dependencies automatically.
18-
Just run:
17+
Run:
1918

20-
`$ rnpm link`
19+
`$ react-native link react-native-calendar-manager`
2120

22-
Which will link all native dependencies from the plugin.
23-
24-
It will also add a directory containing your app's AppDelegate to CalendarManager projects build path which is necessary for building the iOS dependencies.
21+
Which will link all native dependencies from the plugin, as well as add a directory containing your app's AppDelegate to CalendarManager projects build path which is necessary for building the iOS dependencies.
2522

2623
### Manual plugin linking
2724

@@ -38,7 +35,7 @@ It will also add a directory containing your app's AppDelegate to CalendarManage
3835
header files installed within the `react-native` `node_modules`
3936
directory.
4037
4. Add the line `$(SRCROOT)/../../ios/<YOUR PROJECT'S NAME>` as well, so that CalendarManager can find yor AppDelegate header file.
41-
38+
4239
#### Android
4340

4441
1. in `android/settings.gradle`
@@ -55,23 +52,23 @@ It will also add a directory containing your app's AppDelegate to CalendarManage
5552
#!groovy
5653
dependencies {
5754
...
58-
compile project(':react-native-calendar-manager')
55+
implementation project(':react-native-calendar-manager')
5956
}
6057
```
6158

62-
3. and finally, in `android/src/main/java/com/{YOUR_APP_NAME}/MainActivity.java` add:
63-
59+
3. and finally, in `android/src/main/java/com/{YOUR_APP_NAME}/MainApplication.java` add:
60+
6461
```
6562
#!java
66-
//... MainActivity.java
67-
import com.shoutem.calendar.CalendarManagerPackage; // <--- This!
63+
//... MainApplication.java
64+
import com.shoutem.calendar.CalendarManagerPackage; // <--- add this!
6865
//...
6966
7067
@Override
7168
protected List<ReactPackage> getPackages() {
7269
return Arrays.<ReactPackage>asList(
73-
new MainReactPackage(),
74-
new CalendarManagerPackage() // <---- and This!
70+
...
71+
packages.add(new MapsPackage()); // <---- add this!
7572
);
7673
}
7774

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-calendar-manager",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "A calendar manager for react-native",
55
"main": "index",
66
"repository": {
@@ -11,11 +11,6 @@
1111
"xcode": "0.8.4",
1212
"rnpm": "1.6.5"
1313
},
14-
"rnpm": {
15-
"commands": {
16-
"postlink": "node node_modules/react-native-calendar-manager/scripts/rnpm-postlink.js"
17-
}
18-
},
1914
"ios": {
2015
"project": "CalendarManager.xcodeproj"
2116
}

react-native.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
dependency: {
3+
hooks: {
4+
prelink: 'node node_modules/react-native-calendar-manager/scripts/add-to-header-search-path.js'
5+
}
6+
}
7+
}

0 commit comments

Comments
 (0)