zazoomauro / node-dependency-injection

The NodeDependencyInjection component allows you to standarize and centralize the way objects are constructed in your application.
https://github.com/zazoomauro/node-dependency-injection/wiki
MIT License
280 stars 34 forks source link

Enable Dump configuration file on Autowire #176

Closed zazoomauro closed 2 years ago

zazoomauro commented 2 years ago

Option to dump configuration file in some specific folder for cache purposes and for compiled typescript

const container = new ContainerBuilder(false, '/path/to/src')
const autowire = new Autowire(container)
autowire.enableDump('/path/store/services.yaml') # yaml option
autowire.enableDump('/path/store/services.js') # js option
autowire.enableDump('/path/store/services.json') # json option

await autowire.process()

// at this point services file will be created.