danfang / danfang/me-api

How external modules/dependencies would work

Open
#2 8 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted question
Dominant language
JavaScript
Stars
839
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Right now, the app looks for specific modules outlined in modules.json in the lib/middleware/ folder. It also pulls all dependency requirements per module from the global package.json.

I was wondering:
1. If people were to build other npm packages as extensions/alternative modules, how would I allow users to install those? I guess the more specific question is, do I look for global modules as well? E.g. instead of `this.use(path, require("./middleware/" + module))`, maybe something like `this.use(path, require(module) || require("./middleware/" + module))`.
2. Design-wise is it better to remove all the integration dependencies (client libraries) from package.json? That way, the user won't have to install packages for integrations they might not use. Or maybe better yet, there is some way to choose the integrations while they are doing `npm install`. Food for thought.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.