c9 / architect

A simple yet powerful plugin system for large-scale node applications
MIT License
981 stars 129 forks source link

loadConfig should accept array of config, not just file path #71

Open matmar10 opened 5 years ago

matmar10 commented 5 years ago

Currently, loadConfig only accepts a file path. However, an equally reasonable approach is to pass the array of plugin definitions directly to loadConfig.

loadConfig supports a JS file, but it requires synchronous loading and return of the plugin list directly via module.exports, which may not be feasible in all applications.

Proposed change adds the following capability:

loadConfig(configArray, base, [callback])

PR inbound.