osdio / noder-react-native

The mobile app of cnodejs.org written in React Native
https://cnodejs.org/about
1.97k stars 389 forks source link

增加 react-web 的支持 #64

Closed flyskywhy closed 8 years ago

flyskywhy commented 8 years ago

使用了修改版的 react-web https://github.com/flyskywhy/react-web ,现可在不影响 ios 和 android 客户端的影响下,添加了浏览器端的支持,做到了代码一次编写、到处(ios, android, web)运行。

我只是增加了 react-web 这个特性的支持,后续不会去增加 noder-react-native 本身的功能,如果 @soliury 不介意后续自己去完善的话(比如浏览器端不太可能扫码登录),可以合并本 pull request :P

另外,我看到 react-native-html-render 是您的项目,如果有空的话请将我在 post_npm_install.sh 中描述的两个 BUG (奇怪的是这两个 BUG 会在 web 版上但不会在 android 版上爆发)修复一下并更新到 npm 上,谢谢:

sed -i "s/export default parseHtml = function (html, done) {/export default function (html, done) {/" node_modules/react-native-html-render/lib/htmlParse.js
sed -i "s/                uri = node.attribs.href;/                let uri = node.attribs.href;/" node_modules/react-native-html-render/lib/htmlRender.js
osdio commented 8 years ago

修改版的react-web是指修复了什么bug还是提升了什么性能?

osdio commented 8 years ago

我比较关心就是您这个修改版的react-web会不会一直支持。。。。

flyskywhy commented 8 years ago

修改版的主要内容见我向原作者 淘宝前端 的 pull request https://github.com/taobaofed/react-web/pull/145 ,主要是添加了几个运行 noder-react-native 必须的组件,以及一些 BUG 修复

如果他们接受了这个 PR ,那有 淘宝前端 的支持就问题不大

而我也有兴趣至少支持半年,到时再看是否又有其它东西吸引我 :smile:

osdio commented 8 years ago

ok, 好的

osdio commented 8 years ago

@flyskywhy , 感谢

flyskywhy commented 8 years ago

注:淘宝前端 已经合并了我写的修改版的 react-web 对应的 pull request :laughing:

另:上面提到的 react-native-html-render 的 BUG 不知您啥时有空修改一下?

osdio commented 8 years ago

这个啊,周末吧,现在困了