Generate Project/Theme/Plugin

Setup Project

This is done once per project.

  • Create the project by running the @wearerequired/generate command in the folder you would like to have your new project locally.
    npx @wearerequired/generate@latest wordpress-project
  • Setup GitHub Slack notifications; in the respective channel comment; (replace my-project with your project-name)
    • /github subscribe wearerequired/my-project comments reviews
    • /github unsubscribe wearerequired/my-project pulls releases deployments
  • Follow the instructions under “Local Installation” in the README.md
Project setup example

Project Repository für deployment vorbereiten

  1. Die Werte in deploy.yml überprüfen, falls nötig anpassen.
    • Ist das deploy_path korrekt?
    • Sind die richtige wp_languages hinterlegt?
    • Falls nicht Cyon: composer Werte hinterlegen wie hier
  2. Für den GitHub Workflow die Secrets im Repo des Projekts für den Slack Channel und die URLs definieren:
    • ENVIRONMENT_URL: URL der Staging-Umgebung, mit Protokoll und ohne Slash am Ende z.B. https://staging.example.com
    • ENVIRONMENT_URL_PRODUCTION: URL der Live-Umgebung, mit Protokoll und ohne Slash am Ende z.B. https://example.com
    • SLACK_CHANNEL: Name vom Slack Channel, ohne #

Setup Theme/Plugin

This is done when a new theme or plugin is needed for a project.

  • Create using @wearerequired/generate command:
    npx @wearerequired/generate@latest wordpress-theme or
    npx @wearerequired/generate@latest wordpress-plugin
  • To setup GitHub Slack notifications manually add a new slack-channel and in the respective channel type /github subscribe wearerequired/my-theme comments reviews & /github unsubscribe wearerequired/my-theme pulls releases deployments
  • Define the theme/plugin repository in composer.json under repositories
{
	"type": "vcs",
	"url": "git@github.com:wearerequired/my-theme.git"
}Code language: JSON / JSON with Comments (json)
  • Install the theme/plugin composer require wearerequired/my-theme
  • Update the “Custom themes/plugins” section in the README.md
  • Commit the changes in the project
  • Grant Dependabot access to the new private repo
Theme setup example