Created
August 5, 2019 18:32
-
-
Save guillaumemolter/3a500dbe85a9f391c79bb859f0d8aaca to your computer and use it in GitHub Desktop.
WordPress management Composer workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "", | |
"description": "", | |
"type": "project", | |
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "https://wpackagist.org" | |
} | |
], | |
"require": { | |
"johnpbloch/wordpress": "^5.2" | |
}, | |
"require-dev": { | |
}, | |
"extra": { | |
"wordpress-install-dir": "build/", | |
"installer-paths": { | |
"vendor/wp-plugins/{$name}/": [ | |
"type:wordpress-plugin" | |
], | |
"vendor/wp-themes/{$name}/": [ | |
"type:wordpress-theme" | |
] | |
} | |
}, | |
"scripts": { | |
"post-install-cmd": [ | |
"mv vendor/wp-themes/* build/wp-content/themes/", | |
"mv vendor/wp-plugins/* build/wp-content/plugins/" | |
], | |
"post-update-cmd": [ | |
"mv vendor/wp-themes/* build/wp-content/themes/", | |
"mv vendor/wp-plugins/* build/wp-content/plugins/", | |
"mv wp-config.php build/wp-config.php" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment