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

插件化支持 #36

Open
fengzilong opened this issue Dec 7, 2018 · 1 comment
Open

插件化支持 #36

fengzilong opened this issue Dec 7, 2018 · 1 comment

Comments

@fengzilong
Copy link
Member

fengzilong commented Dec 7, 2018

一些非核心功能的提取,保证 target 的功能不会过于复杂,比如配置管理这种有了更好,没有也不影响使用的特性,同时也更加开放,有些 api 设计不合理的地方用户可以有其他更好的选择

target.config.js

{
  "plugins": [
    {
      "name": "@megalo/config-manager",
      "options": {
        wechat: require( './configs/wechat.js' ),
        // alipay: ...
        // swan: ...
      }
    }
  ]
}

@megalo/config-manager

class ConfigManager {
  apply( api, hooks ) {}
}
@fengzilong
Copy link
Member Author

后期将 framework 支持也提取成插件,target提供更核心的功能

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

No branches or pull requests

1 participant