mCloud Design Mobile

mCloud Design Mobile

  • Docs
  • API
  • Help
  • Blog

›Croe

Croe

  • mCloud-Design-Mobile
  • Contributing

贡献说明

请遵循以下规则来贡献此项目

Directory Structure

  • 组件统一在component目录下创建对应的Finder并实现demo&style目录以及index.js
  • 在docs目录下创建对应的.md
  • example下补充对应的demo用例

Develop Rules

  • 组件的统一导出入口在compoents/index.js,在完成组件的实现后请对应增加导出声明
  • 组件业务代码不允许直接实现style,需要在对应组件目录的style下实现index.js来实现导出函数
    • style的实现必须以函数式实现,不允许直接声明style
    • style的内部样式需要以函数内的参数的属性来实现大部分属性值
  • 组件必须由WithTheme类包裹,通过children function return方式实现
  • git-hooks配置了提交时的eslint验证机制,如验证失败请修改后提交
  • 适配dark mode: 在components/style/themes下,默认使用light样式,在dark.js内适配,dark默认继承自light,哪些属性需要变更自行编写,保持属性名和light内一致即可

Doc Rules

  • 每个组件必须配备.md说明
  • doc内的id属性必须是唯一性,title & sidebar_label属性自行定义
  • doc内由3部分组成
    • Description 描述
    • Example 示例代码(必须要保证示例代码的正确性,如果需要添加第三方依赖,请在website/core/RemarkablePlugins.js内的data-snack-dependencies属性上对应增加)
    • Props 两种形态的props描述,请参照.md
  • .md完成后需要对应在website/sidebars.json中根据目录规则,添加自定义的.md id属性
  • 调试website:cd website & yarn start
  • 需要保证doc和component的匹配准确性,doc编辑完成后需要调试website来验证效果

Example Develop

  • 在/example/componentList内参照示例补充调试用例
  • ios: / xcode run
  • android: / android studio run

TODO

  • 配置 github commit auto build component and publish npm
  • 配置 github pull request auto run website build and publish github.io
← mCloud-Design-MobileNext →
  • Directory Structure
  • Develop Rules
  • Doc Rules
  • Example Develop
  • TODO
mCloud Design Mobile
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Facebook Open Source
Copyright © 2019 Your Name or Your Company Name