I'm building up a new project that will consist of a central API, which a number of different sub-projects will link into.
For simplicity's sake, let's say that part of the functionality of the whole platform is to get an image's metadata. This might happen in the core API, or on either the server or front-end of one of the sub-projects.
All of this will be written in Javascript, and functions like this will be pure and contained in their own modules. I'd like to have a single place where I can create and edit these modules, so that in any instance above, I can do something like:
import getImageMetaData from 'getImageMetadata'; // it's within node_modules
const resource = 'http://example.com/image.jpg'
const metaData = getImageMetaData(resource);
...
Is the simplest way simply giving this module its own github repo, then including it in package.json
on all of the different sides of the service, and constantly run (using hooks or whatever) npm install upgrade my-package
?
Any smart ways to keep this all in sync? Preferably as automated as possible ~ there might be up to a dozen of the front-end sub-projects, and I want to be sure that I can fix all of them at once.
So the issue is that you need all the consuming projects to be up-to-date with the latest version of each module? Are you going to be the one who will be re-running
npm install upgrade my-package
or is it other people?