0.2.3 • Published 8 years ago

dora-plugin-config-manager v0.2.3

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

dora-plugin-config-manager

NPM version Build Status Coverage Status NPM downloads

dora plugin for config manager。


Usage

$ npm i dora dora-plugin-config-manager -SD
$ ./node_modules/.bin/dora --plugins 'atool-build,config-manager?path=./config.js|exports-exports&watchDelay=300'

Param - path

It is the path to your global *.config.js file. If you do not specify exports would export default, otherwise would export exports which you specify after |.

Multiple exports please the connector - to connect them one by one.

Note: config is the reserved word!

The exports will be seted by Dora.set

So you can use the value in other plugins, just by Dora.get

If the exports named a , then the way to get the configure is this.get('_global_a')

If you dont use exports the default configure is under this.get('_global_config')

Param - watchDelay

Your *.config.js is alive!

If exports which named a e.x. changed during servering. You can receive the event by this.get('configManagerEmitter').on('_global_a', callback).

Or global.configManagerEmitter.on('_global_a', callback)

Test

$ npm test

LICENSE

MIT

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago