浏览代码

update version to 0.1.0; use react-immutable-component; update example; change name to react-native-autoheight-webview

iou90 7 年前
父节点
当前提交
0835399fd1

+ 3
- 1
autoHeightWebView/index.android.js 查看文件

@@ -16,9 +16,11 @@ import {
16 16
     WebView
17 17
 } from 'react-native';
18 18
 
19
+import ImmutableComponent from 'react-immutable-component';
20
+
19 21
 const RCTAutoHeightWebView = requireNativeComponent('RCTAutoHeightWebView', AutoHeightWebView, { nativeOnly: { messagingEnabled: PropTypes.bool } });
20 22
 
21
-export default class AutoHeightWebView extends Component {
23
+export default class AutoHeightWebView extends ImmutableComponent {
22 24
     constructor(props) {
23 25
         super(props);
24 26
         this.onMessage = this.onMessage.bind(this);

+ 3
- 1
autoHeightWebView/index.ios.js 查看文件

@@ -11,7 +11,9 @@ import {
11 11
     WebView
12 12
 } from 'react-native';
13 13
 
14
-export default class AutoHeightWebView extends Component {
14
+import ImmutableComponent from 'react-immutable-component';
15
+
16
+export default class AutoHeightWebView extends ImmutableComponent {
15 17
     constructor(props) {
16 18
         super(props);
17 19
         this.handleNavigationStateChange = this.handleNavigationStateChange.bind(this);

+ 1
- 1
examples/explorer/explorer.js 查看文件

@@ -13,7 +13,7 @@ import {
13 13
     View
14 14
 } from 'react-native';
15 15
 
16
-import AutoHeightWebView from 'react-native-autoheightwebview';
16
+import AutoHeightWebView from 'react-native-autoheight-webview';
17 17
 
18 18
 export default class Explorer extends Component {
19 19
     constructor(props) {

+ 1
- 1
examples/explorer/package.json 查看文件

@@ -9,7 +9,7 @@
9 9
   "dependencies": {
10 10
     "react": "15.4.2",
11 11
     "react-native": "0.40.0",
12
-    "react-native-autoheightwebview": "file:///Users/iou90/Works/Lab/react-native-autoheightwebview"
12
+    "react-native-autoheight-webview": "file:///Users/iou90/Works/Lab/react-native-autoheight-webview"
13 13
   },
14 14
   "devDependencies": {
15 15
     "babel-jest": "18.0.0",

+ 8
- 5
package.json 查看文件

@@ -1,6 +1,6 @@
1 1
 {
2
-  "name": "react-native-autoheightwebview",
3
-  "version": "0.0.18",
2
+  "name": "react-native-autoheight-webview",
3
+  "version": "0.1.0",
4 4
   "description": "An auto height webview for React Native",
5 5
   "main": "autoHeightWebView",
6 6
   "files": [
@@ -12,12 +12,15 @@
12 12
   },
13 13
   "repository": {
14 14
     "type": "git",
15
-    "url": "git+https://github.com/iou90/react-native-autoheightwebview.git"
15
+    "url": "git+https://github.com/iou90/react-native-autoheight-webview.git"
16 16
   },
17 17
   "author": "iou90",
18 18
   "license": "ISC",
19 19
   "bugs": {
20
-    "url": "https://github.com/iou90/react-native-autoheightwebview/issues"
20
+    "url": "https://github.com/iou90/react-native-autoheight-webview/issues"
21 21
   },
22
-  "homepage": "https://github.com/iou90/react-native-autoheightwebview#readme"
22
+  "homepage": "https://github.com/iou90/react-native-autoheight-webview#readme",
23
+  "dependencies": {
24
+    "react-immutable-component": "0.0.1"
25
+  }
23 26
 }