match stream data using regular expression

We do not need full text available in order to match using regular expression, try https://www.npmjs.com/package/@yiminghe/regexp :

npm i @yiminghe/regexp

Then we can pull char from stream and match it by regular expression.

继续阅读
广告

yarn using npm.taobao.org

最近由 facebook 出品了全新的 javascript 包管理器 yarn,经过尝试其在保持 npm3 兼容性的基础上,大大提高了安装速度,以及增加了不少新功能,具体详细查看: https://yarnpkg.com.

但在国内由于源的问题,速度仍然大大受到限制,这里提供基于 npm.taobao.org 源的 yarn 包:         tyarn.

继续阅读

使用 rc-animate 快速对 react element 动画

原文: https://github.com/react-component/animate/blob/master/docs/zh-cn/intro.md

近期很多组件 侧重于动画效果,而 react 一开始仅仅是有 简单 的支持,现在则是比较难理解的 react-motion
在我看下还是 angular-animate 的 api 好用些. 这次刚好统一下组件动画,
抽取出 rc-animate 模块,通过该模块可以很方便得进行动画.

以下示例可见: http://react-component.github.io/animate/examples/

继续阅读

compare kissy with react

原文:https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/kissy-react-compare.md

react 在传统组件架构的基础上增加了创新性的 虚拟 domdiff 算法,减少了传统组件架构的手动局部渲染问题,并使用类似 html 的 jsx 语法来构建组件,配合极简的 api,概念很少,入门很快。

本文将介绍如何从传统的组件架构 KISSY 迁移到 react。示例组件为 menu 以及calendar/date-picker

kissy menu: https://github.com/kissyteam/menu react menu:https://github.com/react-component/menu

kissy date-picker: https://github.com/kissyteam/date-picker react calendar:https://github.com/react-component/calendar

继续阅读

KISSY 5 Is Released

原文: http://blog.kissyui.com/2014/10/17/kissy-5-is-released/

KISSY 经过四年多的发展,在今天迎来了里程碑式的第五个大版本,也为了今后更加符合语义化的版本规范,新版本命名为 KISSY 5 ,你可以通过 cdn 来使用

<script src="//g.alicdn.com/kissy/k/5.0.0/seed.js" data-config="{combine:true}"></script>

<!--
调试版
<script src=''//g.alicdn.com/kissy/k/5.0.0/seed-debug.js" data-config="{combine:true}"></script>
-->

或者通过 npm 下载到本地使用

npm install kissy@5.0.0

或者参见源码库自行 build

https://github.com/kissyteam/kissy/

接下来介绍下 KISSY 5 的一些主要特性,ppt 详见: https://speakerdeck.com/yiminghe/kissy-5-upgrade

继续阅读