Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

ChrisWiegman/chriswiegman-plugin

Repository files navigation

ChrisWiegman.com Functionality

Added functionality for ChrisWiegman.com.

Setup Development Environment

Before starting your workstation will need the following:

  1. Clone the repository

git@github.com:ChrisWiegman/chriswiegman-plugin.git

  1. Start Lando
cd chriswiegman-plugin
make start

When finished, Lando will give you the local URL of your site. You can finish the WordPress setup there.

WordPress Credentials:

URL: https://chriswiegman-plugin.lndo.site/wp-admin

Admin User: admin

Admin Password: password

You can open the site in your default browser with

make open-site

If you would like to access the database directly, I recommend TablePlus. If it, or any other app that can support MySQL links, is installed use the following command to open your database directly in the app:

make open-db

Note: The "open" commands were developed on Mac and may not work on another OS. You can edit the Makefile to adjust the appropriate commands for your operating system.

Using Xdebug

Xdebug 3 released a number of changes that affect the way Xdebug works. Namely, it no longer listens on every request and requires a "trigger" to enable the connection. Use one of the following plugins to enable the trigger on your machine:

Build and Testing

The only current build asset is the .pot file for internationalization. Build it with the following:

make build

Note, assets will also build during the install phase.

The project uses the Brain Monkey library for unit testing. Once setup run the following for unit tests:

make test-phpunit

We also use PHP_CodeSniffer with WordPress Coding Standards and JSHint with WordPress' JS Standards. Linting will automagically be setup for you if you use Visual Studio Code. If you want to run it manually use the following:

make test-lint

You can run all testing (all lints and unit tests) together with the following:

make test

Screw something up? You can reset your environment with the following. It will stop the environment and cleanup and the build files as well as anything downloaded.

make reset

Using GitHub Actions

GitHub Actions are used for automated testing on GitHub. Before pushing to GitHub the first time ensure you have initialized the project with make start to avoid the actions failing.

Preparing for release

To generate a .zip that can be uploaded through any normal WordPress plugin installation workflow, simply run the following:

make release

About

Added functionality for ChrisWiegman.com

Topics

Resources

Stars

Watchers

Forks