Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
firede committed Nov 6, 2014
2 parents 97e9707 + 28dce42 commit 97a0f6e
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 24 deletions.
6 changes: 6 additions & 0 deletions History.md
@@ -1,4 +1,10 @@

0.4.4 / 2014-11-06
==================

* **修复** breakpoint 对最小值的判断
* **更新** `stylus` 版本至 `0.49.3`(上一个版本存在较严重 bug)

0.4.3 / 2014-09-24
==================

Expand Down
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -3,8 +3,9 @@ rider [![NPM version](https://badge.fury.io/js/rider.png)](https://npmjs.org/pac

`rider` 是一个基于 [`stylus`](https://github.com/LearnBoost/stylus)、专注于 **移动 Web** 的 CSS 样式库。

文档
---
它提供了样式初始化、顺时针简写、缓动函数、图片、排版、单位转换、形状、动画、响应式工具等功能,可以让你的前端样式开发更轻松、更省心。

## 文档

+ 安装与配置
+ [`edp` 环境使用](https://github.com/ecomfe/edp-provider-rider)
Expand Down
2 changes: 1 addition & 1 deletion demo/server.js
@@ -1,7 +1,7 @@
var express = require('express');
var stylus = require('stylus');
var rider = require('../lib/rider');
var ap = require('autoprefixer');
var ap = require('autoprefixer-core');
var path = require('path');

var app = express();
Expand Down
3 changes: 2 additions & 1 deletion doc/api.md
@@ -1,4 +1,5 @@
# API
API
===

## 全局配置

Expand Down
4 changes: 2 additions & 2 deletions doc/code-style.md
@@ -1,4 +1,5 @@
# 代码风格
代码风格
===

`stylus` 自由度很高,代码风格很容易差异化。为了团队协作与代码的可读性,请在开发时遵守本约定。

Expand Down Expand Up @@ -43,4 +44,3 @@ initialize()
// 当 Mixin 应用于 CSS root 时,加括号执行
font-face('rider-icon', 'font/rider-icon')
```

3 changes: 2 additions & 1 deletion doc/connect.md
@@ -1,4 +1,5 @@
# 在 connect/express 环境使用
在 connect/express 环境使用
===

## 安装

Expand Down
4 changes: 3 additions & 1 deletion doc/demo-and-ut.md
@@ -1,4 +1,5 @@
# DEMO与单元测试
DEMO与单元测试
===

发布版是不包含 `demo``test` 的,所以需要先将仓库 clone 到本地:

Expand All @@ -11,6 +12,7 @@ $ git clone https://github.com/ecomfe/rider.git
```shell
$ npm install
```

## DEMO

在仓库根目录执行:
Expand Down
9 changes: 6 additions & 3 deletions doc/faq.md
@@ -1,8 +1,11 @@
# 常见问题
常见问题
===

## `@require``@import` 用哪个?
## @require@import 用哪个?

尽量使用 `@require``@require` 多次引入同一文件时只会执行一次,`@import` 每次都会执行。
根据需求而定,通常使用 `@require`

`@require` 多次引入同一文件时只会执行一次,`@import` 每次都会执行。

## RIA项目如何组织各视图样式?

Expand Down
8 changes: 4 additions & 4 deletions lib/rider.js
@@ -1,13 +1,13 @@
/**
* rider
*
*
* @author firede(firede@firede.us)
*/


/**
* stylus plugin
*
*
* @param {Object} options
* @return {Function}
*/
Expand All @@ -19,13 +19,13 @@ function plugin(options) {
implicit = true;
}

return function(style) {
return function (style) {
// include rider
style.include(__dirname);

// implicit import handling
if (implicit) {
style.import('rider');
style.import('rider'); // jshint ignore: line
}
};
}
Expand Down
4 changes: 2 additions & 2 deletions lib/rider/breakpoint.styl
Expand Up @@ -41,10 +41,10 @@ breakpoint()
// 0 means larger than largest slice
$max-value = 0

if $min-value > 0
if $min-value > 1
push($mq-array, '(min-width: %s)' % $min-value)

if $max-value > 0
if $max-value > 1
push($mq-array, '(max-width: %s)' % $max-value)

else if $arg-type == 'string' && $arg in ('portrait' 'landscape')
Expand Down
2 changes: 1 addition & 1 deletion lib/rider/setting.styl
@@ -1,5 +1,5 @@
// setting
//
//
// @author firede(firede@firede.us)
// @desc default settings, you can overriding it by yourself.

Expand Down
10 changes: 5 additions & 5 deletions package.json
@@ -1,16 +1,16 @@
{
"name": "rider",
"version": "0.4.3",
"version": "0.4.4",
"description": "Rider is a CSS library to focus on Mobile Web, build on top of Stylus.",
"maintainers": [
{ "name": "Firede", "email": "firede@firede.us" }
],
"devDependencies": {
"autoprefixer": "~3.1.0",
"stylus": "~0.49.0",
"express": "~4.9.4",
"autoprefixer-core": "~3.1.2",
"stylus": "~0.49.3",
"express": "~4.10.1",
"ejs": "~1.0.0",
"mocha": "~1.21.4",
"mocha": "~1.21.5",
"should": "~4.0.4"
},
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion test/cases/breakpoint.css
Expand Up @@ -98,4 +98,8 @@
foo: bar;
}
}

@media (max-width: 400px) {
.test-21 {
display: block;
}
}
4 changes: 4 additions & 0 deletions test/cases/breakpoint.styl
Expand Up @@ -86,3 +86,7 @@
+breakpoint('retina', at(3))
.test-20
foo: bar

+at(1)
.test-21
display: block

0 comments on commit 97a0f6e

Please sign in to comment.