Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev tools 的设计 #4

Open
awmleer opened this issue Oct 21, 2019 · 5 comments
Open

dev tools 的设计 #4

awmleer opened this issue Oct 21, 2019 · 5 comments

Comments

@awmleer
Copy link
Member

awmleer commented Oct 21, 2019

为了让开发者调试更方便,可以做一套dev tools

@awmleer
Copy link
Member Author

awmleer commented Oct 21, 2019

为了简单起见,是不是可以直接暴露成 window 上的一个 object ?后面有精力了再做成 redux 那样的 chrome 插件?

使用方法例如:

window.hox.model // 或者直接 hox.model
// ->
{
  counter: {...},
  user: {...},
  posts: {...},
}

hox.startMonitorChanges() // 监听 model 的变化
// ->
{
  time: 1234556, // 时间戳
  name: 'counter',
  prev: {...},
  next: {...},
}

hox.stopMonitorChanges() // 停止监听

(仅在 dev 编译模式下有效)

@brickspert
Copy link
Member

我觉得可以的,这块优先级可以放低~

@BetterLuke
Copy link

hox路转粉一位,真心期望再来一个和Chrome集成的devtools,辛苦啦,打call!

@PDKSophia
Copy link

可以,这位老哥的提议着实不错,自己也在项目中实践了一下hox,也有一些小感触,hox实践感触及简陋版的dev-tools

@PDKSophia
Copy link

hox路转粉一位,真心期望再来一个和Chrome集成的devtools,辛苦啦,打call!

https://github.com/PDKSophia/sugar-hox-devtools 写了一个简单的 npm 包,不过还是跟你一样,期待官方的devtools,目前也是在dev环境下使用 😂

@awmleer awmleer pinned this issue May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants