提交 15d89172 编写于 作者: M Minwe

update style guide;

add CONTRIBUTING.md
上级 1d894f8a
# 助力 Amaze UI
***相关细节有待完善!***
欢迎拾柴,助力 Amaze UI 发展。感谢所有的参与者!
如果你没有相关经验,建议先阅读下面的文章:
- [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)
- [The Beginner’s Guide to Contributing to Open Source Projects](http://blog.newrelic.com/2014/05/05/open-source_gettingstarted/)
- [How to Start Contributing to Open Source](http://www.developer.com/open/how-to-start-contributing-to-open-source.html)
## Bug 反馈
- 查看 [Issue
系统](https://github.com/allmobilize/amazeui/issues) 或者相关评论,确认 Bug
是否已经有人提交过,如果有,请直接在回复以前的反馈者;
- 确认 Bug 是否已经被修复;
- 隔离使用场景,确认 Bug 是否由第三方文件导致;
- 详细描述 Bug 出现的场景,包括:操作系统、浏览器及版本等;
- 如有可能尽量添加截图;
- 尽量添加可以在线查看的演示页面,推荐使用 JSBin 等工具。
## 功能需求
欢迎提交功能需求。不过提交之前先看看以下几点:
- 访问[官方网站](http://amazeui.org/),浏览相应栏目,确定是否已经有你需要的功能;
- 查看 [Issue
系统](https://github.com/allmobilize/amazeui/issues)[开发路线图](https://github.com/allmobilize/amazeui/wiki/Roadmap),确定需求是否已经有人提交过,或者已经在官方的计划列表中;
- 需求必须符合我们的目标和理念(面向现代浏览器);
- 尽可能详细描述需求,如果能附上实例更加。
## Pull Request
Pull Request 之前,请先阅读 [Amaze UI 编码规范](https://github.com/allmobilize/amazeui/wiki/Style-Guide)
(相关代码检测、测试流程陆续完善中。)
## 我们希望用户参与的项目
- SCSS 等其他 CSS 扩展语言的支持:通过编写自动转换脚本实现,人工迁移同步更新成本太高;
- 使用 Amaze UI 开发制作模板;
- Angular.js、Ember.js 等框架的支持;
- 基于 Amaze UI 样式开发 JavaScript 插件;
- ...
......@@ -3,7 +3,7 @@
## 基本规范
-[AllMobilize HTML/CSS Style Guide](/getting-started/html-css-guide)
- [AllMobilize HTML/CSS Style Guide](/getting-started/html-css-guide)
## HTML/CSS 编写注意事项
......
......@@ -253,7 +253,7 @@ var name = 'My Name',
#### 缩进
缩进 **4 个空格**,如果使用 Tab,需要把 Tab 设置成 4 个空格。
缩进 **2 个空格**,如果使用 Tab,需要把 Tab 设置成 2 个空格。
#### 花括号
......@@ -586,7 +586,8 @@ var obj = {
- [Google JavaScript Style Guide](https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml)
- [JSDoc Tag Reference](https://code.google.com/p/jsdoc-toolkit/wiki/TagReference)
- [Code Conventions for the JavaScript Programming Language](http://javascript.crockford.com/code.html)
- []()
- [JavaScript Code Style checker](https://github.com/jscs-dev/node-jscs)
- [JSHint Options](http://jshint.com/docs/options/)
*Revision: 2014.10.15*
......@@ -3,11 +3,34 @@
## 基本编码规范
需要通过 JSHint 验证,更多细节:
* [AllMobilize JavaScript Style Guide](/getting-started/javascript-guide)
* [CMD 模块定义规范](https://github.com/seajs/seajs/issues/242)
## 代码质量控制工具
Amaze UI 使用 [JSHint](http://jshint.com/)[JSCS](https://github.com/jscs-dev/node-jscs) 控制代码质量。
详细设置参见 [.jshintrc](https://github.com/allmobilize/amazeui/blob/master/.jshintrc)[.jscsrc](https://github.com/allmobilize/amazeui/blob/master/.jscsrc)
(部分直接使用第三方库的代码未通过质量控制工具检测。)
## jQuery / Zepto.js 使用规范
为提高代码执行效率,为二者兼容提供可能,在使用 jQuery / Zepto.js 时做以下约定:
- 存放 jQuery / Zepto 对象的变量以 `$` 开头;
- 禁止使用 `slideUp/Down()` `fadeIn/fadeOut()` 等方法;
- 尽量不使用 `animate()` 方法;
- 使用和 Zepto.js 兼容的基本选择符,不使用效率较低且与 Zepto.js 不兼容的选择符。
__问题:__
- **自定义事件命名空间:** Zepto.js 不支持 `.` 语法,只能使用 `:` 语法。
- http://zeptojs.com/#event
- http://api.jquery.com/event.namespace/
## 命名规范
### 基本原则
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册