decred / politeiagui

ISC License
62 stars 56 forks source link

[plugin-architecture] Create toolkit package #2812

Closed tiagoalvesdulce closed 2 years ago

tiagoalvesdulce commented 2 years ago

We currently share a lot of configuration code between plugins (webpack, jest config, babel config, scripts on package.json).

We can create a toolkit package e.g. politeiagui-scripts to centralize and manage all scripts and config stuff. This way we can remove a lot of duplicated code from plugins and apps. We will also add an option to eject from politeiagui-scripts so the plugin author can customize the plugin as they please if necessary.

I'm still considering if we should merge this with the CLI package or not. One thing I might do is to move the template folder from CLI to a politeiagui-template package so it can be referenced by politeiagui-scripts and cli.

victorgcramos commented 2 years ago

Good one! We should also pay attention to webpack polyfill so we don't need to manually install deps for each package.