mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-11 09:53:32 +03:00
0a5f600dfe
- we shouldn't need individual LICENSE files because these packages won't be published, so the top-level one applies - also cleaned up README files to remove mentions of Lerna monorepos and install instructions
572 B
572 B
Adapter Manager
A manager for retrieving custom "adapters" - can be used to abstract away from custom implementations
Usage
const AdapterManager = require('@tryghost/adapter-manager');
const adapterManager = new AdapterManager({
pathsToAdapters: [
'/path/to/custom/adapters',
'/path/to/default/adapters'
]
});
class MailAdapterBase {
someMethod() {}
}
adapterManager.register('mail', MailAdapterBase);
const mailAdapterInstance = adapterManager.getAdapter('mail', 'direct', mailConfig);
mailAdapterInstance.someMethod();