-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
200 lines (196 loc) · 4.98 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
如何搭建:
react-native
react-web
//windows配置react-native:
安装JDK
安装nodejs
安装python(C++环境)
npm install -g react-native
npm install -g react-native-cli
//adb安装Apk
一、配置系统环境变量:
ANDROID_HOME:E:\android-sdk//sdk的安装目录
在path中加入:;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
//创建项目
react-native init X
react-native start
react-native run-android
*首次运行会出现红色错误页面,安卓设备按菜单键在Dev Settings中设置服务器ip和端口
重新加载页面就OK
react-native 智能提醒:(webstorm:file->import setting->ReactNative.jar)
git clone https://github.com/virtoolswebplayer/ReactNative-LiveTemplate
//react-web
npm install react-web-cli -g
react-web init X-name
文档:https://github.com/taobaofed/react-web
//打包
react-web bundle
参考文档:
http://facebook.github.io/react-native/releases/0.31/docs/webview.html#webview
http://www.kancloud.cn/digest/rnative/121808
http://blog.csdn.net/watertekhqx/article/details/51302235
Flex布局
http://www.tuicool.com/articles/a6Rjmi2
所有属性:
"alignItems",
"alignSelf",
"backfaceVisibility",
"backgroundColor",
"borderBottomColor",
"borderBottomLeftRadius",
"borderBottomRightRadius",
"borderBottomWidth",
"borderColor",
"borderLeftColor",
"borderLeftWidth",
"borderRadius",
"borderRightColor",
"borderRightWidth",
"borderStyle",
"borderTopColor",
"borderTopLeftRadius",
"borderTopRightRadius",
"borderTopWidth",
"borderWidth",
"bottom",
"color",
"flex",
"flexDirection",
"flexWrap",
"fontFamily",
"fontSize",
"fontStyle",
"fontWeight",
"height",
"justifyContent",
"left",
"letterSpacing",
"lineHeight",
"margin",
"marginBottom",
"marginHorizontal",
"marginLeft",
"marginRight",
"marginTop",
"marginVertical",
"opacity",
"overflow",
"padding",
"paddingBottom",
"paddingHorizontal",
"paddingLeft",
"paddingRight",
"paddingTop",
"paddingVertical",
"position",
"resizeMode",
"right",
"rotation",
"scaleX",
"scaleY",
"shadowColor",
"shadowOffset",
"shadowOpacity",
"shadowRadius",
"textAlign",
"textDecorationColor",
"textDecorationLine",
"textDecorationStyle",
"tintColor",
"top",
"transform",
"transformMatrix",
"translateX",
"translateY",
"width",
"writingDirection"
pm2
安装:npm install -g pm2
启动程序:pm2 start <app_name|id|all>
列举进程:pm2 list
退出程序:pm2 stop <app_name|id|all>
重起应用:pm2 restart
程序信息:pm2 describe id|all
监控:pm2 monit
实时集中log处理: pm2 logs
API:pm2 web (端口:9615 )
pm2 cluster模式:
1. 使用-f 参数强制其更换启动模式:pm2 start app.js -i 2 -f
2. 使用pm2 kill ,关闭deamon,然后重新使用pm2 start app.js开启。
//windows配置react-native:
安装JDK
安装nodejs
安装python(C++环境)
npm install -g react-native
npm install -g react-native-cli
//adb安装Apk
一、配置系统环境变量:
ANDROID_HOME:E:\android-sdk//sdk的安装目录
在path中加入:;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
//创建项目
react-native init X
react-native start
react-native run-android
*首次运行会出现红色错误页面,安卓设备按菜单键在Dev Settings中设置服务器ip和端口
重新加载页面就OK
react-native 智能提醒:(webstorm:file->import setting->ReactNative.jar)
git clone https://github.com/virtoolswebplayer/ReactNative-LiveTemplate
参考文档:
http://facebook.github.io/react-native/releases/0.31/docs/webview.html#webview
http://www.kancloud.cn/digest/rnative/121808
https://github.com/reactnativecn/react-native-guide
https://github.com/taobaofed/react-web
打包:gradlew assembleRelease(Android目录下)
配置:在gradle.properties增加:
MYAPP_RELEASE_STORE_FILE=lyp.keystore
MYAPP_RELEASE_KEY_ALIAS=lyp
MYAPP_RELEASE_STORE_PASSWORD=password
MYAPP_RELEASE_KEY_PASSWORD=password
在android/app/build.gradle增加:
signingConfigs {
release {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"),
"proguard-rules.pro"
signingConfig signingConfigs.release
}
}
Adb命令:
adb kill-server
adb devices
adb install -r x.apk //-r 强制安装
keytool:
keytool -list -keystore x.keystore
keytool -genkeypair -alias "name" -keyalg "RSA" -keystore "name.keystore"
微信开发文档:
http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html#.E8.8E.B7.E
5.8F.96.E2.80.9C.E5.88.86.E4.BA.AB.E7.BB.99.E6.9C.8B.E5.8F.8B.E2.80.9D.E6.8C.89.
E9.92.AE.E7.82.B9.E5.87.BB.E7.8A.B6.E6.80.81.E5.8F.8A.E8.87.AA.E5.AE.9A.E4.B9.89
.E5.88.86.E4.BA.AB.E5.86.85.E5.AE.B9.E6.8E.A5.E5.8F.A3
//ES6
http://es6.ruanyifeng.com/