firstandthird / load-grunt-config

Grunt plugin that lets you break up your Gruntfile config by task
firstandthird.github.io/load-grunt-config/
MIT License
374 stars 64 forks source link

Async Config Loading #144

Closed lzilioli closed 8 years ago

lzilioli commented 8 years ago

I want to asynchronously generate the configs for one of my grunt tasks. Is this possible using load-grunt-config? Looking at how the config files are read in, it appears to not be the case. https://github.com/firstandthird/load-grunt-config/blob/master/lib/readconfigdir.js#L24

Any opposition/thoughts around extending the supported API of the exported function to return its config asynchronously?

SolomoN-ua commented 8 years ago

Hi @lzilioli, you can use postProcess: function(config) {} functionality for extending config object with your generated configurations. But you should note that postProcess happens before any grunt tasks are executed.

SolomoN-ua commented 8 years ago

As far as I know Grunt configuration should be initialized before Grunt will execute any task. If you need to change it during tasks execution you will need to do it manually by using grunt.config API.

SolomoN-ua commented 8 years ago

Hi @lzilioli, can you provide any feedback?

SolomoN-ua commented 8 years ago

Hi @lzilioli, closing this issue for now. Let me know if you still have problems.