We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
许多场景下,私有化部署时需要基于开源 Plugin 进行扩展(例如生命周期),需要提供扩展 Plugin 私有化的能力,而非只能 fork 代码全量修改后发包。
例如开源版本的 @artus/mysql,本土化部署时 mysql 连接前需要进行一些异步定制操作再继续,希望无需 fork @artus/mysql 代码,而是编写一个 @private/mysql 继承 @artus/mysql 进行扩展,这样开源版本的 @artus/mysql 即作为 Npm 依赖位于 @private/mysql 中,只需要关注扩展的私有定制逻辑即可。
@artus/mysql
@private/mysql
The text was updated successfully, but these errors were encountered:
有意思,之前我们只想了框架的继承和扩展,看起来插件也应该是可以继承和扩展的。
Sorry, something went wrong.
赞,这个是非常强的诉求
这种依赖注入的方式还是很适合做插件的继承和拓展的,因为没有目录规范,就按照标准的 npm 模块 export ,然后内部的 import 进来再 extend 就行。
只是看一下应该要先把依赖注入方式下的插件实现规范确定了或者给个 poc ?
具体的 Plugin 继承形式我还在构思中
No branches or pull requests
许多场景下,私有化部署时需要基于开源 Plugin 进行扩展(例如生命周期),需要提供扩展 Plugin 私有化的能力,而非只能 fork 代码全量修改后发包。
例如开源版本的
@artus/mysql
,本土化部署时 mysql 连接前需要进行一些异步定制操作再继续,希望无需 fork@artus/mysql
代码,而是编写一个@private/mysql
继承@artus/mysql
进行扩展,这样开源版本的@artus/mysql
即作为 Npm 依赖位于@private/mysql
中,只需要关注扩展的私有定制逻辑即可。The text was updated successfully, but these errors were encountered: