mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
08b786af3b
- this was all getting terribly behind so I've done several things: - majority of `@tryghost/*` except Lexical packages - gscan + knex-migrator to remove old `@tryghost/errors` usage - bumped lockfile |
||
---|---|---|
.. | ||
lib | ||
test | ||
.eslintrc.js | ||
index.js | ||
package.json | ||
README.md |
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();