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

通过配置或者约定配置获取自定义组件描述配置 #109

Open
landn172 opened this issue Feb 22, 2019 · 5 comments
Open

通过配置或者约定配置获取自定义组件描述配置 #109

landn172 opened this issue Feb 22, 2019 · 5 comments

Comments

@landn172
Copy link

描述

发布自定义组件库时能支持minapp-vscode代码支持。
看了下源码是在如下地方拿到对应组件json描述

packages/minapp-common/src/custom.ts
image

期望

通过配置或者约定配置获取自定义组件描述配置
image
可以是项目根目录或者是co.resolve目录下

@qiu8310
Copy link
Owner

qiu8310 commented Feb 23, 2019

你意思是可以解析 npm 里的组件信息吗?

@landn172
Copy link
Author

想要探讨一下有没有通用解决方案?
假定通用配置为components.json
解析npm组件信息会读取components.json、
解析项目中定义的公共components.json

@qiu8310
Copy link
Owner

qiu8310 commented Feb 25, 2019

我觉得格外为了给这个插件提供一个配置文件,对使用者来说是一个额外的负担;

最好的方式是通过小程序自身的特点来自动解析,实在无法解析可以通过 vscode 的配置方式来配置全局的组件

@landn172
Copy link
Author

我觉得这个算是一个feature,对于使用者来说是无感知的。
我的出发点有两个:

  1. 对于组件开发者,有一个统一的地方维护组件定义。对于插件来说只需要索引一次组件定义即可,不需要动态去查询。
  2. 减少对组件json的影响(大小等)

@qiu8310
Copy link
Owner

qiu8310 commented Mar 4, 2019

嗯,3.0 的时候考虑

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

2 participants