Open shanejonas opened 5 years ago
A good reference for this is vue-cli plugins. see vue-cli-plugin-pristine for an example plugin.
Pristines solution however needs to be language agnostic. The two main components we need to replicate are.
Taking advantage of/extending upon .pristine/post-install.sh makes the most sense.
Adding to this further. Naming conventions would be good to differentiate templates from plugins. In the case of vue there's only the initial vue base + plugins, plugins are name vue-cli-plugin-NAME and published to npm. They are then instantly available to vue-cli via vue add NAME.
Pristine however needs multiple bases (currently all handled via template repos). e.g pristine-typescript pristine-go pristine-rust
and plugins that extend upon a specific base. e.g pristine-typescript-react pristine-typescript-electron pristine-typescript-openrpc-server
I suggest pristine-LANGUAGE for base repos/templates, followed by BASE-plugin-NAME for plugins. e.g:
pristine-typescript pristine-typescript-plugin-react pristine-typescript-plugin-electron
Why? we can tell pristine-* are pristine repos, those without 'plugin' are base repos (pristine-cli create) those with 'plugin' are extensions to base repos, and we know what base repo the plugin extends. We would need an exception for the pristine-cli repo itself otherwise something like this should be flexible enough.
Do we need dependency resolution? or can docs suffice in cases where plugin C requires plugin B to be added first? Docs are likely enough but something to consider as a feature down the road.
linking this here: https://github.com/etclabscore/pristine-typescript-react-jade/issues/54
Is your feature request related to a problem? Please describe. As a user i'd like to compose multiple pristine projects together