@ogre-tools/injectable-extension-for-auto-registration
Advanced tools
Weekly downloads
Readme
Auto register injectables from default exports of files that match a require.context.
$ npm install @ogre-tools/injectable
$ npm install @ogre-tools/injectable-extension-for-auto-registration
...
const di = createContainer();
autoRegister({
di,
requireContexts: [
require.context("./some-directory", true, /\.injectable\.(ts|tsx)$/),
require.context("./some-other-directory", true, /\.injectable\.(ts|tsx)$/),
],
});
Check unit tests for documentation.
FAQs
Auto-registration of injectables for Injectable in Ogre Tools
The npm package @ogre-tools/injectable-extension-for-auto-registration receives a total of 1,046 weekly downloads. As such, @ogre-tools/injectable-extension-for-auto-registration popularity was classified as popular.
We found that @ogre-tools/injectable-extension-for-auto-registration demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.