Skip to content

Developer Notes

Rob Knight edited this page Jan 10, 2023 · 10 revisions

A collection of links, code snippets, and documentation of things we've learned along the way.

Deployment looks like this.

  1. In theme directory, run npm run build && composer install
  2. Release npm run release
    • Updates the CHANGELOG
    • Bumps version in NPM package
    • TODO: how to bump version in style.css?
  3. Run npm run zip
  • Added build directory to the repo and deploying from Github directly to the CampusPress Bitbucket repo.
  • We need to add pre-deploy testing and code formatting

Helpful Links

Block Patterns

Styles (block and theme)

Building Block Themes

WordPress/PHP code formatting for VS Code

  1. Install PHP_CodeSniffer
  2. Install the WordPress Coding Standards in a permanent location in your filesystem. PHPCS will need to reference the location.
  3. Add the WPCS path from above ⬆️ to PHPCS's installed_paths config setting.
  4. Install PHPCS extension for VC Code
  5. Add settings to VS Code (settings.json):
"phpcs.enable": true,
"phpcs.executablePath": "./vendor/bin/phpcs",
"phpcs.standard": "WordPress",
"phpcs.showWarnings": true,
"phpcs.composerJsonPath": "composer.json",