This package has been deprecated

Author message:

I have no more ideas

module-registry
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

Module Registry

npm package npm downloads Build Status

Getting Started

npm i module-registry

Usage

import { Module } from 'module-registry'
 
@Module({
    name: 'SomeModule',
})
export default class SomeModule {
    public hello() {
        return 'hello';
    }
}
 
@Module({
    dependencies: [ SomeModule ],
    name: 'TestController',
    marker: 'Http',
    method: 'get',
    path: '/hello'
})
export default class TestControllerModule {
    constructor(
        public readonly somes: SomeModule) {
    }
    public work() {
        return somes.hello();
    }
}
import ModuleRegistry from 'module-registry'
 
const registry = new ModuleRegistry('./modules', path => path.match(/\.Module.(ts|js)/));
registry.initialize();
 
const someModule = registry.lookup<TestControllerModule>('TestController');
console.log(someModule.hello())

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i module-registry

Weekly Downloads

0

Version

0.0.6

License

MIT

Unpacked Size

14.8 kB

Total Files

30

Last publish

Collaborators

  • javarouka