Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0c01ed2

Browse files
(1)初始化提交 CodeReader
1 parent afc706c commit 0c01ed2

File tree

36 files changed

+5610
-0
lines changed

36 files changed

+5610
-0
lines changed

‎CoderReader/.babelrc‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": ["babel-preset-expo"],
3+
"env": {
4+
"development": {
5+
"plugins": ["transform-react-jsx-source"]
6+
}
7+
}
8+
}

‎CoderReader/.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.png filter=lfs diff=lfs merge=lfs -text

‎CoderReader/.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/**/*
2+
.expo/**/*

‎CoderReader/.watchmanconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

‎CoderReader/App.js‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import React from "react";
2+
import { Platform, StatusBar, StyleSheet, View } from "react-native";
3+
import { AppLoading } from "expo";
4+
import { FontAwesome, MaterialIcons } from "@expo/vector-icons";
5+
import RootNavigation from "./src/screen/RootNavigation";
6+
7+
import cacheAssetsAsync from "./src/util/cacheAssetsAsync";
8+
9+
export default class AppContainer extends React.Component {
10+
state = {
11+
appIsReady: false
12+
};
13+
14+
componentWillMount() {
15+
this._loadAssetsAsync();
16+
}
17+
18+
/**
19+
* Description 首先加载所有的资源
20+
* @returns {Promise.<void>}
21+
* @private
22+
*/
23+
async _loadAssetsAsync() {
24+
try {
25+
await cacheAssetsAsync({
26+
images: [require("./assets/images/navigation/header_background.png")],
27+
fonts: [
28+
FontAwesome.font,
29+
MaterialIcons.font,
30+
{ "space-mono": require("./assets/fonts/SpaceMono-Regular.ttf") }
31+
]
32+
});
33+
} catch (e) {
34+
console.warn(
35+
"There was an error caching assets (see: main.js), perhaps due to a " +
36+
"network timeout, so we skipped caching. Reload the app to try again."
37+
);
38+
console.log(e.message);
39+
} finally {
40+
this.setState({ appIsReady: true });
41+
}
42+
}
43+
44+
render() {
45+
if (this.state.appIsReady) {
46+
return (
47+
<View style={styles.container}>
48+
{Platform.OS === "ios" && <StatusBar barStyle="default" />}
49+
{Platform.OS === "android" &&
50+
<View style={styles.statusBarUnderlay} />}
51+
<RootNavigation />
52+
</View>
53+
);
54+
} else {
55+
return <AppLoading />;
56+
}
57+
}
58+
}
59+
60+
const styles = StyleSheet.create({
61+
container: {
62+
flex: 1,
63+
backgroundColor: "#fff"
64+
},
65+
statusBarUnderlay: {
66+
height: 24,
67+
backgroundColor: "rgba(0,0,0,0.2)"
68+
}
69+
});

‎CoderReader/README.md‎

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# CoderReader
2+
3+
CoderReader 是笔者闲暇时编写的专门的技术人员阅读应用,其包含了知识图谱、搜索、资讯、周刊、书籍等栏目,内容整合自笔者在[ Coder-Reference: 追求技术之上的进阶阅读学习索引](https://zhuanlan.zhihu.com/p/25642783)一文中介绍的技术社区,包括但不限于:
4+
5+
- 资讯聚合:[HackerNews](https://news.ycombinator.com/news)[Reddit](https://www.reddit.com/)[Google+](plus.google.com)[推酷](tuicool.com)[TechMeme](https://www.techmeme.com/)[V2EX](https://www.v2ex.com/)[DZone](dzone.com)
6+
- 技术书籍:[Gitbook](https://www.gitbook.com/)[SafariBooksOnline](https://www.safaribooksonline.com/)
7+
- 技术阅读:[Medium](https://medium.com)[开发者头条](https://toutiao.io)[掘金](https://gold.xitu.io/)[CSDN](http://www.csdn.net/)
8+
- 技术问答:[StackOverflow](https://stackoverflow.com/)[SegmentFault](https://segmentfault.com/)
9+
- 开源社区:[Github](https://github.com/)[OSChina](https://git.oschina.net/)[coding.net](https://coding.net)
10+
- 期刊订阅:[MyBridge](mybridge.co)[InfoQ 架构师](www.infoq.com/cn)[CSDN 程序员杂志]()[码农周刊](http://weekly.manong.io/)[高可用架构系列](http://www.ituring.com.cn/search?q=%E9%AB%98%E5%8F%AF%E7%94%A8%E6%9E%B6%E6%9E%84&type=)[ThoughtWorks 技术雷达](https://assets.thoughtworks.com/assets/technology-radar-apr-2016-cn.pdf)
11+
- 在线学习:[Coursera](https://www.coursera.org/)[edX](https://www.edx.org/)[Udacity](https://cn.udacity.com/)[MIT公开课](https://ocw.mit.edu/index.htm)[MOOC学院](http://mooc.guokr.com/course/)[慕课网](http://www.imooc.com/)
12+
- 在线编程:[LeetCode](https://leetcode.com/)[Project Euler](https://projecteuler.net/)[CodingGame](https://www.codingame.com/start)[Kaggle](https://www.kaggle.com/)[Topcoder](https://www.topcoder.com/)、牛客网、[HackerRank](https://www.hackerrank.com/)
13+
- 大厂风范:[MSDN](https://msdn.microsoft.com/zh-cn)[Google 开发者 ](https://developers.google.cn/)[云栖社区](https://yq.aliyun.com/)[IBM DeveloperWorks](http://www.ibm.com/developerworks/)[Facebook AI Research ](https://research.fb.com/ai-helps-facebooks-internet-drones-find-where-the-people-are/)[Facebook](https://code.facebook.com/posts/)[airbnb](http://nerds.airbnb.com/)
14+
15+
16+
该应用目前是基于 Expo SDK 进行编译与发布,请先前往 Android 应用市场或者 APPStore 下载 Expo Client,然后扫描如下二维码即可打开:
17+
18+
![](https://coding.net/u/hoteam/p/Cache/git/raw/master/2017/6/1/wx-coder-expo.png)
19+
20+
21+
本文余下部分是笔者在进行 React Native 开发过程中的笔记与实践总结,有兴趣者不妨一看。
22+
23+
# 配置与调试
24+
25+
![](https://docs.expo.io/0af875d134c9a8835b71baaa0e1791bc-quality=50&pngCompressionLevel=9&width=1822.png)
26+
27+
```json
28+
{
29+
"name": "CoderReader",
30+
"description": "No description",
31+
"slug": "CoderReader",
32+
"privacy": "public",
33+
"sdkVersion": "18.0.0",
34+
"version": "1.0.0",
35+
"orientation": "portrait",
36+
"primaryColor": "#cccccc",
37+
"icon": "./assets/icons/app-icon.png",
38+
"notification": {
39+
"icon": "./assets/icons/notification-icon.png",
40+
"color": "#000000",
41+
"iconUrl": "http://localhost:19001/assets/./assets/icons/notification-icon.png"
42+
},
43+
"loading": {
44+
"icon": "./assets/icons/loading-icon.png",
45+
"hideExponentText": false,
46+
"iconUrl": "http://localhost:19001/assets/./assets/icons/loading-icon.png"
47+
},
48+
"packagerOpts": {
49+
"hostType": "localhost",
50+
"lanType": "ip",
51+
"dev": true,
52+
"strict": false,
53+
"minify": false,
54+
"urlType": "exp",
55+
"urlRandomness": "gp-j7r"
56+
},
57+
"ios": {
58+
"supportsTablet": true
59+
},
60+
"xde": true,
61+
"developer": {
62+
"tool": "xde"
63+
},
64+
"env": {},
65+
"bundleUrl": "http://localhost:19001/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles",
66+
"debuggerHost": "localhost:19001",
67+
"mainModuleName": "node_modules/expo/AppEntry",
68+
"logUrl": "http://localhost:19000/logs",
69+
"iconUrl": "http://localhost:19001/assets/./assets/icons/app-icon.png"
70+
}
71+
```
72+
73+
```json
74+
{
75+
"android": {
76+
"package": "cn.wxcoder.reader"
77+
}
78+
}
79+
```
80+
81+
```shell
82+
83+
# 编译 Android 版本
84+
85+
exp ba / exp build:android
86+
87+
# 编译独立的 iOS ipa 包
88+
89+
exp bi / exp build:ios
90+
```
91+
92+
[Expo Vector Icons](https://expo.github.io/vector-icons/)
93+
94+
# 路由导航

‎CoderReader/app.json‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"expo": {
3+
"name": "CoderReader",
4+
"description": "程序员的阅读与休闲",
5+
"slug": "CoderReader",
6+
"privacy": "public",
7+
"sdkVersion": "18.0.0",
8+
"version": "0.0.1",
9+
"orientation": "portrait",
10+
"primaryColor": "#cccccc",
11+
"icon": "./assets/icons/app-icon.png",
12+
"notification": {
13+
"icon": "./assets/icons/notification-icon.png",
14+
"color": "#000000"
15+
},
16+
"loading": {
17+
"icon": "./assets/icons/loading-icon.png",
18+
"hideExponentText": false
19+
},
20+
"packagerOpts": {
21+
"assetExts": [
22+
"ttf"
23+
]
24+
},
25+
"ios": {
26+
"supportsTablet": true
27+
},
28+
"android": {
29+
"package": "cn.wxcoder.reader"
30+
}
31+
}
32+
}
91.1 KB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Loading[フレーム]
Lines changed: 3 additions & 0 deletions
Loading[フレーム]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /