Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

brix.js 是否有必要持有 ready 事件? #55

Description

@nuysoft

brix.js 是 Brix 应用的入口,主要提供了 3 项功能:

  1. 读取配置选项,与默认选项值合并,最终构造出完整的选项集。
  2. 提供 Brix.ready(fn) 功能,用以取代 KISSY.ready(),统一编码风格(推测)。
  3. 在选项 autoConfig 为 true 时配置包路径和包路径映射(map)。

在查看上述实现时,有 2 个疑问:

  1. brix.js 中涉及的初始化选项繁多,而且不集中,这个问题已向波哥反映,属于代码待重构改进。
  2. brix.js 是否有必要持有 ready 事件?个人没有觉得这么做带来了新功能或者方便,封装一次就多一个疑问多一点学习成本,因此建议仍然交给 KISSY.ready()。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions