feat: Turn Core←→Plug-ins #62
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Turn dev pkg into a Plug-ins architecture allowing to add plugins on the based targets enriching the experience of the
makecommand for development.With this change now it is possible to extends the basic targets defined in the package just by including the a key=value item into the
MODULESvar.# MODULES is a list of dev modules (mk) to be included in the project. MODULES := \ DEVGO_PATH=github.com/bool64/devto add another module, right now is as simple as
# MODULES is a list of dev modules (mk) to be included in the project. MODULES := \ DEVGO_PATH=github.com/bool64/dev \ DEVGRPCGO_PATH=github.com/dohernandez/dev-grpcwhere the key value
DEVGO_PATHis the root path and var that will be exported for further use. The valuegithub.com/bool64/devrepresents the github repository where the mk files are stored.Example of how to add a plugin,
github.com/dohernandez/dev-grpc:2.Add the module into the
dev_test.goto your unused importpackage mymodule_test import ( _ "github.com/bool64/dev" // Include development helpers to the project. _ "github.com/dohernandez/dev-grpc" // Include development grpc helpers to the project.