grunt-wordpress
grunt-wordpress copied to clipboard
Change order of deployment
The wordpress-sync task currently runs wordpress-sync-terms, then wordpress-sync-posts, then wordpress-sync-resources. This means that a post can be updated and link to a resource that hasn't been published yet. To prevent this problems, the sync tasks should be split. I think the right order is:
- Add/edit terms
- Add/edit resources
- Add/edit posts
- Remove posts
- Remove resources
- Remove terms
Removing terms at the end also allows posts to use keywords that aren't defined up front. See https://github.com/scottgonzalez/grunt-wordpress/blob/f368a4a17b304da6708ea6c59201b0abbf818cb2/tasks/wordpress/taxonomies.js#L272.