wesleytodd / YeoPress

A Yeoman generator for WordPress
Other
1.08k stars 163 forks source link

verbose logging appears out of order for custom theme install #136

Open Toddses opened 9 years ago

Toddses commented 9 years ago

This is what you see (v2.0.0):

>> Starting theme setup
Setting Up Theme
Installing Node Packages (be patient)
>> Theme setup complete

Then you wait... and, finally

Running Grunt Setup
Theme setup!

This would make more sense for the completion note to come in after everything else is done. This has to do with sending this.async() to the wordpress.js util function, it doesn't stop execution of the task, only execution of the following tasks.

One possible fix is to run the task async and send the wordpress.js util functions a callback. We can control the flow of the wordpress.js util functions, while preventing the execution of the remaining code in the task. All the console messages will be in the right order. Funtimes.