From 904a5b7112bcc997d0c0d6172a1bb2af5009566e Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Mon, 30 Oct 2023 14:54:47 -0600 Subject: [PATCH 01/13] docs: add setup info for Windows users --- .gitignore | 1 + README.md | 118 +++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 94 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 3527f66..1617163 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .DS_Store *.code-workspace .vscode +.devcontainer .nova .gitallowed diff --git a/README.md b/README.md index f49c66b..9a9ceaa 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,9 @@ Out of the box, this template provides a minimal WordPress theme with basic supp ## Quickstart -This project requires [Docker][docker] and [Node.js][node] for local development. You may also find it useful to install [Composer][composer] for linting in your editor, but it isn't strictly necessary. To run the project for the first time, do the following: +This project requires [Docker][docker] and [Node.js][node] for local development. For a better editing experience for PHP and Twig files, it's useful to have [PHP installed][php-install] on your system as well. If you are on Windows and use VS Code, you may find it helpful to [run VS Code in a container][vs-code-container] so that you can more easily work with PHP (see more details in the [Local Development Setup section](#running-vs-code-in-a-container)). + +To run the project for the first time, do the following: 1. Duplicate `.env.example` and rename it `.env`, changing variables [as needed](#setting-local-environment-variables) 1. Run `npm install` @@ -84,6 +86,10 @@ Beyond that, it's up to you to customize the site based on your project's needs. ## Local Development Setup +### npm scripts + +This project defines most scripts for development tasks as [npm scripts][npm-scripts], which are defined in the `scripts` field in `package.json`. If you're developing on Windows, you may need to run `npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"` for some scripts to work. + ### Setting Local Environment Variables For the local environment we are using a `.env` to define the username, passwords, and the database name used in the Docker container. @@ -97,7 +103,7 @@ For the local environment we are using a `.env` to define the username, password ### Linting -This theme uses the following files for linting: +This theme uses the following tools for linting: - ESLint for JS files with recommended rules for vanilla JS and React - Stylelint for SCSS files with standard CSS and SCSS rules @@ -185,11 +191,12 @@ If you use Atom, go to Preferences > Packages. Open the `language-php` Core Pack #### VS Code -If you use Microsoft VS Code, create a `settings.json` inside a `.vscode` directory at the root of the project. Include this in your setting (it will help make developing with PHP_Codesniffer much easier): +If you use [VS Code][vs-code], create a `settings.json` inside a `.vscode` directory at the root of the project. Include this in your setting (it will help make developing with PHP_Codesniffer and twigcs much easier): ```json { "phpcs.standard": "wp-configs/phpcs-rules-standard.xml", + "twigcs.executablePath": "vendor/bin/twigcs", "editor.tabSize": 2, "[php]": { "editor.tabSize": 4, @@ -201,8 +208,63 @@ If you use Microsoft VS Code, create a `settings.json` inside a `.vscode` direct Helpful VS Code Extensions: -- [phpcs][phpcs_vscode] -- [Twig][twig_vscode] +- [phpcs][phpcs-vscode] +- [Twig][twig-vscode] +- [twigcs][twigcs-vscode] + +##### Running VS Code in a Container + +The [Dev Containers extension][dev-containers-vscode] allows you to run VS Code inside a container, giving you access to a consistent environment that you can configure to include the dependencies you need. For this project, we recommend an Ubuntu container with the same PHP version as in the [Dockerfile](./Dockerfile), the LTS version of Node.js, and Docker (docker-in-docker). + +After installing the Dev Containers extension, you can manually create the container through the extension's UI, or you can add a configuration file at `.devcontainer/devcontainer.json`, like so: + +```json +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu +{ + "name": "Ubuntu", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:jammy", + "features": { + "ghcr.io/devcontainers/features/node:1": { + "nodeGypDependencies": true, + "version": "lts", + "nvmVersion": "latest" + }, + "ghcr.io/shyim/devcontainers-features/php:0": { + "installComposer": true, + "version": "8.1" + }, + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "moby": true, + "azureDnsAutoDetection": true, + "installDockerBuildx": true, + "version": "latest", + "dockerDashComposeVersion": "v2" + } + }, + "customizations": { + "vscode": { + "extensions": ["shevaua.phpcs", "whatwedo.twig", "cerzat43.twigcs"] + } + } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} +``` ## WordPress @@ -673,30 +735,36 @@ Deployment to Pantheon requires setting the following variables and secrets in G -[docker]: https://www.docker.com +[advanced-custom-fields]: https://www.advancedcustomfields.com/ +[babel]: https://babeljs.io +[bem]: http://getbem.com +[bemit]: https://csswizardry.com/2015/08/bemit-taking-the-bem-naming-convention-a-step-further/ [composer]: https://getcomposer.org/download/ +[contact-form-7]: https://contactform7.com/ +[dev-containers-vscode]: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers +[docker]: https://www.docker.com +[gh-personal-access-token]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic +[gh-secrets]: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository +[gh-variables]: https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-a-repository +[google-site-kit]: https://sitekit.withgoogle.com/ +[html-extension]: https://github.com/twigphp/html-extra +[itcss]: https://www.xfive.co/blog/itcss-scalable-maintainable-css-architecture/ +[metabox]: https://metabox.io/ [node]: https://nodejs.org/en/ -[twig_vscode]: https://marketplace.visualstudio.com/items?itemName=whatwedo.twig -[phpcs_vscode]: https://marketplace.visualstudio.com/items?itemName=shevaua.phpcs -[babel]: https://babeljs.io +[npm-scripts]: https://docs.npmjs.com/cli/v6/using-npm/scripts +[php-install]: https://www.php.net/manual/en/install.php +[phpcs-vscode]: https://marketplace.visualstudio.com/items?itemName=shevaua.phpcs +[rollbar]: https://docs.rollbar.com/docs/wordpress +[sass]: https://sass-lang.com/ [sb-eslint]: https://github.com/sparkbox/eslint-config-sparkbox [sb-stylelint]: https://github.com/sparkbox/stylelint-config-sparkbox -[wpcs]: https://github.com/WordPress/WordPress-Coding-Standards -[bemit]: https://csswizardry.com/2015/08/bemit-taking-the-bem-naming-convention-a-step-further/ -[twig]: https://twig.symfony.com/ -[timber]: https://timber.github.io/docs/ -[html-extension]: https://github.com/twigphp/html-extra [string-extension]: https://github.com/twigphp/string-extra +[timber]: https://timber.github.io/docs/ +[twig-vscode]: https://marketplace.visualstudio.com/items?itemName=whatwedo.twig +[twig]: https://twig.symfony.com/ +[twigcs-vscode]: https://marketplace.visualstudio.com/items?itemName=cerzat43.twigcs +[vs-code-container]: https://code.visualstudio.com/docs/devcontainers/tutorial +[vs-code]: https://code.visualstudio.com/ [widgets]: https://developer.wordpress.org/themes/functionality/sidebars/ -[metabox]: https://metabox.io/ -[advanced-custom-fields]: https://www.advancedcustomfields.com/ +[wpcs]: https://github.com/WordPress/WordPress-Coding-Standards [yoast-seo]: https://wordpress.org/plugins/wordpress-seo/ -[google-site-kit]: https://sitekit.withgoogle.com/ -[contact-form-7]: https://contactform7.com/ -[rollbar]: https://docs.rollbar.com/docs/wordpress -[itcss]: https://www.xfive.co/blog/itcss-scalable-maintainable-css-architecture/ -[bem]: http://getbem.com -[sass]: https://sass-lang.com/ -[gh-variables]: https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-a-repository -[gh-secrets]: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository -[gh-personal-access-token]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic From f19d19ebdd11fc3bde3de79c0dc815fb2b61b551 Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Mon, 30 Oct 2023 16:07:12 -0600 Subject: [PATCH 02/13] refactor: change settings for more optimal local development --- Dockerfile | 2 ++ README.md | 12 ++++++--- composer.lock | 38 ++++++++++++++--------------- docker-compose.yml | 4 +++ package.json | 1 + scripts/run.sh | 2 +- wp-configs/phpcs-rules-standard.xml | 1 + 7 files changed, 36 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 752cec9..40ee76b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ RUN docker-php-ext-install gd mysqli pdo_mysql zip RUN a2enmod rewrite headers xml2enc proxy proxy_fcgi COPY ./composer.json /var/www/html/composer.json +COPY ./composer.lock /var/www/html/composer.lock COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install @@ -36,6 +37,7 @@ RUN find /var/www/ -type f -exec chmod 644 {} \; # make the linters executable so we can run them from containers RUN chmod +x vendor/bin/phpcs +RUN chmod +x vendor/bin/phpcbf RUN chmod +x vendor/bin/twigcs FROM dev as prod diff --git a/README.md b/README.md index 9a9ceaa..218fd91 100644 --- a/README.md +++ b/README.md @@ -195,11 +195,13 @@ If you use [VS Code][vs-code], create a `settings.json` inside a `.vscode` direc ```json { - "phpcs.standard": "wp-configs/phpcs-rules-standard.xml", + "phpsab.executablePathCS": "vendor/bin/phpcs", + "phpsab.executablePathCBF": "vendor/bin/phpcbf", + "phpsab.standard": "wp-configs/phpcs-rules-standard.xml", "twigcs.executablePath": "vendor/bin/twigcs", "editor.tabSize": 2, "[php]": { - "editor.tabSize": 4, + "editor.tabSize": 2, "editor.insertSpaces": false, "editor.detectIndentation": false } @@ -208,10 +210,12 @@ If you use [VS Code][vs-code], create a `settings.json` inside a `.vscode` direc Helpful VS Code Extensions: -- [phpcs][phpcs-vscode] +- [phpsab][phpsab-vscode] - [Twig][twig-vscode] - [twigcs][twigcs-vscode] +Note: you will need to have vendor files available on your host machine (not the container they're installed in) for the linters to highlight code while you're working. You can run `npm run map-vendor-files` to make them available at the paths specified in the sample `settings.json` above, and as long as you have PHP installed on your system, they _should_ work. Windows has limited support for PHP, though, so you may want to run VS Code in a container so that PHP will be more easily available (or you can choose to live without real-time error highlighting). + ##### Running VS Code in a Container The [Dev Containers extension][dev-containers-vscode] allows you to run VS Code inside a container, giving you access to a consistent environment that you can configure to include the dependencies you need. For this project, we recommend an Ubuntu container with the same PHP version as in the [Dockerfile](./Dockerfile), the LTS version of Node.js, and Docker (docker-in-docker). @@ -753,7 +757,7 @@ Deployment to Pantheon requires setting the following variables and secrets in G [node]: https://nodejs.org/en/ [npm-scripts]: https://docs.npmjs.com/cli/v6/using-npm/scripts [php-install]: https://www.php.net/manual/en/install.php -[phpcs-vscode]: https://marketplace.visualstudio.com/items?itemName=shevaua.phpcs +[phpsab-vscode]: https://marketplace.visualstudio.com/items?itemName=ValeryanM.vscode-phpsab [rollbar]: https://docs.rollbar.com/docs/wordpress [sass]: https://sass-lang.com/ [sb-eslint]: https://github.com/sparkbox/eslint-config-sparkbox diff --git a/composer.lock b/composer.lock index 65951eb..fd052d8 100644 --- a/composer.lock +++ b/composer.lock @@ -417,16 +417,16 @@ }, { "name": "symfony/mime", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98" + "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", - "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", + "url": "https://api.github.com/repos/symfony/mime/zipball/d5179eedf1cb2946dbd760475ebf05c251ef6a6e", + "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e", "shasum": "" }, "require": { @@ -481,7 +481,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.3.3" + "source": "https://github.com/symfony/mime/tree/v6.3.5" }, "funding": [ { @@ -497,7 +497,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-09-29T06:59:36+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1077,16 +1077,16 @@ }, { "name": "symfony/string", - "version": "v6.3.2", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "53d1a83225002635bca3482fcbf963001313fb68" + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", - "reference": "53d1a83225002635bca3482fcbf963001313fb68", + "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", "shasum": "" }, "require": { @@ -1143,7 +1143,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.2" + "source": "https://github.com/symfony/string/tree/v6.3.5" }, "funding": [ { @@ -1159,7 +1159,7 @@ "type": "tidelift" } ], - "time": "2023-07-05T08:41:27+00:00" + "time": "2023-09-18T10:38:32+00:00" }, { "name": "symfony/translation-contracts", @@ -2270,16 +2270,16 @@ }, { "name": "symfony/finder", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e" + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9915db259f67d21eefee768c1abcf1cc61b1fc9e", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", "shasum": "" }, "require": { @@ -2314,7 +2314,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.3" + "source": "https://github.com/symfony/finder/tree/v6.3.5" }, "funding": [ { @@ -2330,7 +2330,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T08:31:44+00:00" + "time": "2023-09-26T12:56:25+00:00" }, { "name": "symfony/service-contracts", @@ -2490,5 +2490,5 @@ "php": "^8.1" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/docker-compose.yml b/docker-compose.yml index c48e5d7..2f7db87 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,10 @@ services: - ./wp-configs/php.ini:/var/www/html/php.ini - ./.env:/var/www/html/.env - ./wp-configs/.htaccess:/var/www/html/.htaccess + - ./wp-configs/phpcs-rules-standard.xml:/var/www/html/wp-configs/phpcs-rules-standard.xml + - ./src:/var/www/html/src + - ./composer.json:/var/www/html/composer.json + - ./composer.lock:/var/www/html/composer.lock db: image: mysql:8.1 container_name: sparkpress_db diff --git a/package.json b/package.json index 60a851b..aef2320 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "lint:scss": "stylelint \"src/**/*.scss\" --color --formatter verbose", "lint:twig": "./scripts/run.sh vendor/bin/twigcs src/php/views", "lint": "run-s lint:*", + "map-vendor-files": "mkdir -p vendor && docker compose cp web:/var/www/html/vendor .", "php:run": "./scripts/run.sh", "export": "run-s \"export:* {1}\" --", "backup": "run-s \"backup:* {1}\" --", diff --git a/scripts/run.sh b/scripts/run.sh index 2b90f4c..c45ff22 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -12,5 +12,5 @@ if [ "$CI" == "true" ]; then exec "$@" else # Run the command inside the Docker container - docker run --rm -v .:/tmp -w=/tmp sparkpress-wordpress-starter-web "$@" + docker compose run --rm --no-deps --remove-orphans web "$@" fi diff --git a/wp-configs/phpcs-rules-standard.xml b/wp-configs/phpcs-rules-standard.xml index 24ee38a..a44ced8 100644 --- a/wp-configs/phpcs-rules-standard.xml +++ b/wp-configs/phpcs-rules-standard.xml @@ -7,6 +7,7 @@ + From afedb50622c81b14b3977e2d750b7f2d6b846be6 Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Tue, 31 Oct 2023 08:29:06 -0600 Subject: [PATCH 03/13] docs: rephrase/clarify info --- README.md | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 218fd91..81749b5 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,6 @@ After generating a new repo from the Sparkpress template, you will need to chang - [ ] `.github/workflows/release-please.yml` (`package-name` field) - [ ] `scripts/export-db.sh` (db container name) - [ ] `scripts/import-db.sh` (db container names) - - [ ] `scripts/run.sh` (container name) - [ ] `src/php/style.css` (theme name plus the other metadata in the file) - [ ] `src/php/inc/theme-scripts.php` (metadata and prefixes for function/script names) - [ ] `src/php/inc/theme-setup.php` (metadata and prefixes for function names) @@ -88,7 +87,7 @@ Beyond that, it's up to you to customize the site based on your project's needs. ### npm scripts -This project defines most scripts for development tasks as [npm scripts][npm-scripts], which are defined in the `scripts` field in `package.json`. If you're developing on Windows, you may need to run `npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"` for some scripts to work. +This project uses [npm scripts][npm-scripts] for most development tasks, and they are defined in the `scripts` field in `package.json`. If you're developing on Windows, you may need to run `npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"` for some scripts to work. ### Setting Local Environment Variables @@ -105,7 +104,7 @@ For the local environment we are using a `.env` to define the username, password This theme uses the following tools for linting: -- ESLint for JS files with recommended rules for vanilla JS and React +- ESLint for JS files with recommended rules for vanilla JS, React, and WordPress - Stylelint for SCSS files with standard CSS and SCSS rules - PHP_Codesniffer for PHP Files with rules from `wp-configs/phpcs-rules-standard.xml` which extends the WordPress Coding Standards. - Twig_Codesniffer with default rules @@ -191,30 +190,43 @@ If you use Atom, go to Preferences > Packages. Open the `language-php` Core Pack #### VS Code -If you use [VS Code][vs-code], create a `settings.json` inside a `.vscode` directory at the root of the project. Include this in your setting (it will help make developing with PHP_Codesniffer and twigcs much easier): +If you use [VS Code][vs-code], you can create a `settings.json` file inside a `.vscode` directory at the root of the project to change how PHP or other languages are treated by the editor. Include this in your settings to help make developing with PHP_Codesniffer and twigcs much easier: ```json { - "phpsab.executablePathCS": "vendor/bin/phpcs", - "phpsab.executablePathCBF": "vendor/bin/phpcbf", - "phpsab.standard": "wp-configs/phpcs-rules-standard.xml", - "twigcs.executablePath": "vendor/bin/twigcs", "editor.tabSize": 2, "[php]": { - "editor.tabSize": 2, + "editor.tabSize": 4, "editor.insertSpaces": false, "editor.detectIndentation": false } } ``` -Helpful VS Code Extensions: +##### Helpful VS Code Extensions + +We recommend these extensions to make working with PHP and Twig easier. -- [phpsab][phpsab-vscode] +- [PHP Sniffer & Beautifier][phpsab-vscode] - [Twig][twig-vscode] - [twigcs][twigcs-vscode] -Note: you will need to have vendor files available on your host machine (not the container they're installed in) for the linters to highlight code while you're working. You can run `npm run map-vendor-files` to make them available at the paths specified in the sample `settings.json` above, and as long as you have PHP installed on your system, they _should_ work. Windows has limited support for PHP, though, so you may want to run VS Code in a container so that PHP will be more easily available (or you can choose to live without real-time error highlighting). +Note: you will need to have vendor files available on your host machine (not the container they're installed in) for the linters to highlight code while you're working. You can run `npm run map-vendor-files` to make them available at the paths specified in the example `settings.json` below, and as long as you have PHP installed on your system, they _should_ work. Windows has limited support for PHP, though, so you may want to run VS Code in a container so that PHP will be more easily available (or you can choose to live without real-time error highlighting). + +```json +{ + "phpsab.executablePathCS": "vendor/bin/phpcs", + "phpsab.executablePathCBF": "vendor/bin/phpcbf", + "phpsab.standard": "wp-configs/phpcs-rules-standard.xml", + "twigcs.executablePath": "vendor/bin/twigcs", + "editor.tabSize": 2, + "[php]": { + "editor.tabSize": 4, + "editor.insertSpaces": false, + "editor.detectIndentation": false + } +} +``` ##### Running VS Code in a Container From 4b6c4afedead91451710449f77ae4c24bc3b1f77 Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Tue, 31 Oct 2023 09:48:58 -0600 Subject: [PATCH 04/13] refactor: favor docker compose in shell scripts --- README.md | 2 -- scripts/export-db.sh | 2 +- scripts/import-db.sh | 6 +++--- scripts/run.sh | 3 ++- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 81749b5..9823ad7 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,6 @@ After generating a new repo from the Sparkpress template, you will need to chang - [ ] `.github/workflows/deploy.docker.yml` (references to the container registry or delete the file if not using a docker deployment process) - [ ] `.github/workflows/deploy.pantheon.yml` (theme folder names) - [ ] `.github/workflows/release-please.yml` (`package-name` field) - - [ ] `scripts/export-db.sh` (db container name) - - [ ] `scripts/import-db.sh` (db container names) - [ ] `src/php/style.css` (theme name plus the other metadata in the file) - [ ] `src/php/inc/theme-scripts.php` (metadata and prefixes for function/script names) - [ ] `src/php/inc/theme-setup.php` (metadata and prefixes for function names) diff --git a/scripts/export-db.sh b/scripts/export-db.sh index 7e803b8..8bcf80e 100755 --- a/scripts/export-db.sh +++ b/scripts/export-db.sh @@ -23,7 +23,7 @@ fi mkdir -p $path # generate SQL dump -docker exec -i sparkpress_db mysqldump --user=root --password=$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE > $path/$prefix-raw.sql +docker compose exec -i db mysqldump --user=root --password=$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE > $path/$prefix-raw.sql # replace localhost URLs with target environment URL sed "s/http:\/\/localhost:8000/$SITE_URL/g" $path/$prefix-raw.sql > $filename diff --git a/scripts/import-db.sh b/scripts/import-db.sh index 865edce..20550a7 100755 --- a/scripts/import-db.sh +++ b/scripts/import-db.sh @@ -17,9 +17,9 @@ gunzip sync/sql/db-import-raw.sql.gz sed "s/$SITE_URL/http:\/\/localhost:8000/g" sync/sql/db-import-raw.sql > sync/sql/db-import.sql # drop existing database, create a new one, and load it up with data -docker exec -i sparkpress_db mysql --user=$MYSQL_USER --password=$MYSQL_PASSWORD -e "drop database if exists $MYSQL_DATABASE" -docker exec -i sparkpress_db mysql --user=$MYSQL_USER --password=$MYSQL_PASSWORD -e "create database $MYSQL_DATABASE" -docker exec -i sparkpress_db mysql --user=$MYSQL_USER --password=$MYSQL_PASSWORD $MYSQL_DATABASE < sync/sql/db-import.sql +docker compose exec -i db mysql --user=$MYSQL_USER --password=$MYSQL_PASSWORD -e "drop database if exists $MYSQL_DATABASE" +docker compose exec -i db mysql --user=$MYSQL_USER --password=$MYSQL_PASSWORD -e "create database $MYSQL_DATABASE" +docker compose exec -iT db mysql --user=$MYSQL_USER --password=$MYSQL_PASSWORD $MYSQL_DATABASE < sync/sql/db-import.sql # clean up files that aren't useful after import rm sync/sql/db-import* diff --git a/scripts/run.sh b/scripts/run.sh index c45ff22..e93531a 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -12,5 +12,6 @@ if [ "$CI" == "true" ]; then exec "$@" else # Run the command inside the Docker container - docker compose run --rm --no-deps --remove-orphans web "$@" + # use exec if the container's already running, or spin up a temporary container to run it + docker compose exec -it web "$@" || docker compose run --rm --no-deps --remove-orphans web "$@" fi From b09993d495e85f2cafafe94d432287af3416ef87 Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Tue, 31 Oct 2023 11:27:32 -0600 Subject: [PATCH 05/13] docs: update outdated config example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9823ad7..a62f7b7 100644 --- a/README.md +++ b/README.md @@ -259,7 +259,7 @@ After installing the Dev Containers extension, you can manually create the conta }, "customizations": { "vscode": { - "extensions": ["shevaua.phpcs", "whatwedo.twig", "cerzat43.twigcs"] + "extensions": ["ValeryanM.vscode-phpsab", "whatwedo.twig", "cerzat43.twigcs"] } } From 41b64005dbc147e70c86f4e7ec07c9c625da3c4b Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Tue, 31 Oct 2023 11:36:30 -0600 Subject: [PATCH 06/13] docs: add disclaimer about rebuilding in containerized VS Code --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a62f7b7..5c71fdd 100644 --- a/README.md +++ b/README.md @@ -280,6 +280,8 @@ After installing the Dev Containers extension, you can manually create the conta } ``` +Note: after restarting in the containerized VS Code, you will need to run `npm ci` and `docker compose build` again. You may also need to delete the `theme` and `plugins` folders so that the build process can recreate them with the right file permissions for the container. + ## WordPress ### Upgrading WordPress From 67d6b074eb7991f6c2572a285b24c8549835a03b Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Tue, 31 Oct 2023 11:51:35 -0600 Subject: [PATCH 07/13] chore: set up consistent line endings for types of files --- .gitattributes | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7b86682 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,22 @@ +# https://www.git-scm.com/docs/gitattributes + +# Set default behavior to automatically normalize line endings. +* text=auto + +# Force bash scripts to always use LF line endings so that if a repo is accessed +# in Unix via a file share from Windows, the scripts will work. +*.sh text eol=lf + +# Set specific extensions manually as binary. +# https://www.git-scm.com/docs/gitattributes#_marking_files_as_binary +*.data -diff + +# Configure non-standard file extensions. Set as text to allow for line ending +# conversion to LF, diff type for Git, and syntax highlighting language for GitHub. +# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md +*.module text diff=php linguist-language=php +*.rs.example text diff=rust linguist-language=rust + +# Windows-specific extensions that require CRLF line endings +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf From b956c20b4e22d9685f3f41682f32aca77087b237 Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Tue, 31 Oct 2023 14:20:41 -0600 Subject: [PATCH 08/13] docs: remove dev containers info and unused links --- README.md | 71 ++++--------------------------------------------------- 1 file changed, 4 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 5c71fdd..8482132 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Out of the box, this template provides a minimal WordPress theme with basic supp ## Quickstart -This project requires [Docker][docker] and [Node.js][node] for local development. For a better editing experience for PHP and Twig files, it's useful to have [PHP installed][php-install] on your system as well. If you are on Windows and use VS Code, you may find it helpful to [run VS Code in a container][vs-code-container] so that you can more easily work with PHP (see more details in the [Local Development Setup section](#running-vs-code-in-a-container)). +This project requires [Docker][docker] and [Node.js][node] for local development. For a better editing experience for PHP and Twig files, it's useful to have [PHP installed][php-install] on your system as well, but it isn't required. To run the project for the first time, do the following: @@ -205,11 +205,11 @@ If you use [VS Code][vs-code], you can create a `settings.json` file inside a `. We recommend these extensions to make working with PHP and Twig easier. -- [PHP Sniffer & Beautifier][phpsab-vscode] +- [PHP Sniffer & Beautifier][phpsab-vscode] (may not work on Windows) - [Twig][twig-vscode] -- [twigcs][twigcs-vscode] +- [twigcs][twigcs-vscode] (may not work on Windows) -Note: you will need to have vendor files available on your host machine (not the container they're installed in) for the linters to highlight code while you're working. You can run `npm run map-vendor-files` to make them available at the paths specified in the example `settings.json` below, and as long as you have PHP installed on your system, they _should_ work. Windows has limited support for PHP, though, so you may want to run VS Code in a container so that PHP will be more easily available (or you can choose to live without real-time error highlighting). +Note: you will need to have vendor files available on your host machine (not the container they're installed in) for the linters to highlight code while you're working. You can run `npm run map-vendor-files` to make them available at the paths specified in the example `settings.json` below, and as long as you have PHP installed on your system, they _should_ work. Windows has limited support for PHP, though, so you may not be able to get real-time error highlighting on PHP/Twig files. ```json { @@ -226,62 +226,6 @@ Note: you will need to have vendor files available on your host machine (not the } ``` -##### Running VS Code in a Container - -The [Dev Containers extension][dev-containers-vscode] allows you to run VS Code inside a container, giving you access to a consistent environment that you can configure to include the dependencies you need. For this project, we recommend an Ubuntu container with the same PHP version as in the [Dockerfile](./Dockerfile), the LTS version of Node.js, and Docker (docker-in-docker). - -After installing the Dev Containers extension, you can manually create the container through the extension's UI, or you can add a configuration file at `.devcontainer/devcontainer.json`, like so: - -```json -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu -{ - "name": "Ubuntu", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:jammy", - "features": { - "ghcr.io/devcontainers/features/node:1": { - "nodeGypDependencies": true, - "version": "lts", - "nvmVersion": "latest" - }, - "ghcr.io/shyim/devcontainers-features/php:0": { - "installComposer": true, - "version": "8.1" - }, - "ghcr.io/devcontainers/features/docker-in-docker:2": { - "moby": true, - "azureDnsAutoDetection": true, - "installDockerBuildx": true, - "version": "latest", - "dockerDashComposeVersion": "v2" - } - }, - "customizations": { - "vscode": { - "extensions": ["ValeryanM.vscode-phpsab", "whatwedo.twig", "cerzat43.twigcs"] - } - } - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "uname -a", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} -``` - -Note: after restarting in the containerized VS Code, you will need to run `npm ci` and `docker compose build` again. You may also need to delete the `theme` and `plugins` folders so that the build process can recreate them with the right file permissions for the container. - ## WordPress ### Upgrading WordPress @@ -752,12 +696,8 @@ Deployment to Pantheon requires setting the following variables and secrets in G [advanced-custom-fields]: https://www.advancedcustomfields.com/ -[babel]: https://babeljs.io -[bem]: http://getbem.com [bemit]: https://csswizardry.com/2015/08/bemit-taking-the-bem-naming-convention-a-step-further/ -[composer]: https://getcomposer.org/download/ [contact-form-7]: https://contactform7.com/ -[dev-containers-vscode]: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers [docker]: https://www.docker.com [gh-personal-access-token]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic [gh-secrets]: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository @@ -772,14 +712,11 @@ Deployment to Pantheon requires setting the following variables and secrets in G [phpsab-vscode]: https://marketplace.visualstudio.com/items?itemName=ValeryanM.vscode-phpsab [rollbar]: https://docs.rollbar.com/docs/wordpress [sass]: https://sass-lang.com/ -[sb-eslint]: https://github.com/sparkbox/eslint-config-sparkbox -[sb-stylelint]: https://github.com/sparkbox/stylelint-config-sparkbox [string-extension]: https://github.com/twigphp/string-extra [timber]: https://timber.github.io/docs/ [twig-vscode]: https://marketplace.visualstudio.com/items?itemName=whatwedo.twig [twig]: https://twig.symfony.com/ [twigcs-vscode]: https://marketplace.visualstudio.com/items?itemName=cerzat43.twigcs -[vs-code-container]: https://code.visualstudio.com/docs/devcontainers/tutorial [vs-code]: https://code.visualstudio.com/ [widgets]: https://developer.wordpress.org/themes/functionality/sidebars/ [wpcs]: https://github.com/WordPress/WordPress-Coding-Standards From 62977609abf30a014aff6e802a5db09baef842d7 Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Tue, 31 Oct 2023 14:21:39 -0600 Subject: [PATCH 09/13] chore: remove pointless gitignore folder --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1617163..3527f66 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ .DS_Store *.code-workspace .vscode -.devcontainer .nova .gitallowed From 12561404dcb6eaed87d49d62f3645e687c766e82 Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Tue, 31 Oct 2023 14:23:25 -0600 Subject: [PATCH 10/13] docs: delete out of context sentence --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8482132..8ce47bf 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ If you use Atom, go to Preferences > Packages. Open the `language-php` Core Pack #### VS Code -If you use [VS Code][vs-code], you can create a `settings.json` file inside a `.vscode` directory at the root of the project to change how PHP or other languages are treated by the editor. Include this in your settings to help make developing with PHP_Codesniffer and twigcs much easier: +If you use [VS Code][vs-code], you can create a `settings.json` file inside a `.vscode` directory at the root of the project to change how PHP or other languages are treated by the editor. ```json { From ad576a6119f9e39d7938a39dcaa72f719abe2a08 Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Fri, 3 Nov 2023 10:16:53 -0600 Subject: [PATCH 11/13] docs: add more Windows info and fix minor typos and such --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8ce47bf..a877d23 100644 --- a/README.md +++ b/README.md @@ -8,15 +8,16 @@ Out of the box, this template provides a minimal WordPress theme with basic supp - Support for SCSS with an ITCSS structure already in place - Support for bundling JS with `esbuild` and testing JS with `vitest` - Support for [Twig][twig] templates using [Timber][timber] -- Database import and export scripts to make syncing between environments simple and fast +- Database/uploads import and export scripts to make syncing between environments simple and fast - Generator scripts to speed up the process of adding: - Page templates - Custom post types - Shortcodes - Custom taxonomies - Reusable patterns + - Custom blocks plugins + - Custom blocks - Meta boxes -- Sample custom blocks which you can reference to create your own custom blocks - Code style rules that are enforced by language-specific linters - GitHub Action workflows for code quality, release management, and deployment processes @@ -40,6 +41,8 @@ Out of the box, this template provides a minimal WordPress theme with basic supp This project requires [Docker][docker] and [Node.js][node] for local development. For a better editing experience for PHP and Twig files, it's useful to have [PHP installed][php-install] on your system as well, but it isn't required. +If you're using Windows, it's best to use Git Bash (included when you install [Git](https://git-scm.com/downloads)) for command line operations for compatibility. If using [VS Code][vs-code], you can [set Git Bash as your default terminal](https://code.visualstudio.com/docs/sourcecontrol/intro-to-git#_git-bash-on-windows). + To run the project for the first time, do the following: 1. Duplicate `.env.example` and rename it `.env`, changing variables [as needed](#setting-local-environment-variables) @@ -89,7 +92,7 @@ This project uses [npm scripts][npm-scripts] for most development tasks, and the ### Setting Local Environment Variables -For the local environment we are using a `.env` to define the username, passwords, and the database name used in the Docker container. +For the local environment we are using a `.env` file to define the username, passwords, and the database name used in the Docker container. - `MYSQL_USER` is the username WordPress will use to access the database - `MYSQL_PASSWORD` is the password for `MYSQL_USER` @@ -182,11 +185,7 @@ You can export your `uploads` folder for another developer to import or to impor This will happen automatically on import, but if you want to manually backup your `uploads` folder, you can run `npm run backup:uploads`. This functions nearly identically to the `export:uploads` script, except for using a different prefix and putting the zip file in `sync/uploads/backups`. As with `export:uploads`, you can specify a name for your backup if you want. -### Atom - -If you use Atom, go to Preferences > Packages. Open the `language-php` Core Package settings. Go to the Tab Type setting and set the drop down option to `hard`. - -#### VS Code +### VS Code If you use [VS Code][vs-code], you can create a `settings.json` file inside a `.vscode` directory at the root of the project to change how PHP or other languages are treated by the editor. @@ -201,7 +200,7 @@ If you use [VS Code][vs-code], you can create a `settings.json` file inside a `. } ``` -##### Helpful VS Code Extensions +#### Helpful VS Code Extensions We recommend these extensions to make working with PHP and Twig easier. @@ -237,7 +236,7 @@ Whenever a new version of WordPress is released, follow this process to update t 1. Change `WP_VERSION` in `Dockerfile` to the latest version 1. Submit a PR with the update 1. If your hosting provider manages the WordPress version, update it through their mechanism for staging, test, and/or production enviroments -1. If the update made breaking changes, create a bug card and _do not_ push any changes +1. If the update made breaking changes, create a bug card/issue and _do not_ push any changes ### Permalink Settings @@ -590,7 +589,7 @@ This starter template includes a couple of options for deployment workflows, inc ### Docker deployment workflow -This repo includes a [GitHub workflow for building a docker image](./.github/workflows/deploy.docker.yml) that gets pushed GitHub's container registry. This image can be deployed to any hosting provider that supports docker containers. +This repo includes a [GitHub workflow for building a docker image](./.github/workflows/deploy.docker.yml) that gets pushed to GitHub's container registry. This image can be deployed to any hosting provider that supports docker containers. The image includes all core WordPress files for the version specified for `WP_VERSION` in the `Dockerfile`, as well as the theme and plugin files necessary for the site. The other element required for the site to run is the database, which is excluded, since each environment should have its own database that is specified by environment variables. This allows local developers to test against local data without interfering with production or staging environments. From 62c73e7b1d46a661d8bd38d0aea74f865ed619bd Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Fri, 3 Nov 2023 10:20:58 -0600 Subject: [PATCH 12/13] docs: reorganize sections for more logical flow --- README.md | 102 +++++++++++++++++++++++++++--------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index a877d23..bb8cbcb 100644 --- a/README.md +++ b/README.md @@ -23,19 +23,19 @@ Out of the box, this template provides a minimal WordPress theme with basic supp ## Table of Contents -| Developer Documentation | -| --------------------------------------------------- | -| [Quickstart](#quickstart) | -| [Customization](#customization) | -| [Local Development Setup](#local-development-setup) | -| [WordPress](#wordpress) | -| [Project Structure](#project-structure) | -| [Generators](#generators) | -| [Plugins](#plugins) | -| [Custom Blocks](#custom-blocks) | -| [Deployment](#deployment) | -| [How to Contribute](./CONTRIBUTING.md) | -| [Code of Conduct](./CODE_OF_CONDUCT.md) | +| Developer Documentation | +| --------------------------------------------------------- | +| [Quickstart](#quickstart) | +| [Customization](#customization) | +| [Local Development Setup](#local-development-setup) | +| [WordPress](#wordpress) | +| [Project Structure](#project-structure) | +| [Plugins](#plugins) | +| [Generators](#generators) | +| [Implementing Custom Blocks](#implementing-custom-blocks) | +| [Deployment](#deployment) | +| [How to Contribute](./CONTRIBUTING.md) | +| [Code of Conduct](./CODE_OF_CONDUCT.md) | ## Quickstart @@ -352,6 +352,42 @@ The `php/` directory holds the PHP template files for the WordPress theme. Other - `partials` - Twig templates for components or pieces of the page to be reused should go here. - `shortcodes` - Twig templates for shortcodes should go here. +## Plugins + +### Installing Plugins + +Install plugins via `composer` by running `npm run php:run composer require wpackagist-plugin/:`. For example: + +```sh +# install a specific version/range for advanced-custom-fields +npm run php:run composer require wpackagist-plugin/advanced-custom-fields:^6.1 + +# or just install the latest version, letting composer resolve the range +npm run php:run composer require wpackagist-plugin/advanced-custom-fields +``` + +Running this command will update `composer.json` and `composer.lock`, but you will need to rebuild (`docker compose build`) and restart your container (`npm start` or `npm run serve:dev`) to see the new plugin reflected in the WordPress admin. + +### Updating Plugins + +You can run `composer require` as above to update existing plugins, or you can do the following. + +1. Update the version number in the "require" list in `composer.json`. +1. Run `npm run php:run composer update` to update `composer.lock`. + +Again, you'll need to rebuild and restart your container to see the changes reflected in WordPress. + +### Recommended Plugins + +This is a non-comprehensive list of plugins that we have found useful on other projects. + +- [Metabox][metabox] +- [Advanced Custom Fields][advanced-custom-fields] +- [Yoast SEO][yoast-seo] +- [Google Site Kit][google-site-kit] +- [Contact Form 7][contact-form-7] +- [Rollbar][rollbar] + ## Generators We have a handful of generators to make it easier to add new custom post types, taxonomies, shortcodes, and page templates. If none of the generators give you what you need, you can try using https://generatewp.com/ to get more relevant code snippets. @@ -489,45 +525,9 @@ The following file will be created based on your input: [Meta Box documentation](https://developer.wordpress.org/plugins/metadata/custom-meta-boxes/) -## Plugins - -### Installing Plugins - -Install plugins via `composer` by running `npm run php:run composer require wpackagist-plugin/:`. For example: - -```sh -# install a specific version/range for advanced-custom-fields -npm run php:run composer require wpackagist-plugin/advanced-custom-fields:^6.1 - -# or just install the latest version, letting composer resolve the range -npm run php:run composer require wpackagist-plugin/advanced-custom-fields -``` - -Running this command will update `composer.json` and `composer.lock`, but you will need to rebuild (`docker compose build`) and restart your container (`npm start` or `npm run serve:dev`) to see the new plugin reflected in the WordPress admin. - -### Updating Plugins - -You can run `composer require` as above to update existing plugins, or you can do the following. - -1. Update the version number in the "require" list in `composer.json`. -1. Run `npm run php:run composer update` to update `composer.lock`. - -Again, you'll need to rebuild and restart your container to see the changes reflected in WordPress. - -### Recommended Plugins - -This is a non-comprehensive list of plugins that we have found useful on other projects. - -- [Metabox][metabox] -- [Advanced Custom Fields][advanced-custom-fields] -- [Yoast SEO][yoast-seo] -- [Google Site Kit][google-site-kit] -- [Contact Form 7][contact-form-7] -- [Rollbar][rollbar] - -## Custom Blocks +## Implementing Custom Blocks -We have two [generators](#generators) that can be used in tandem to create the necessary scaffolding for custom blocks. The first is `npm run generate:custom-blocks-plugin`, which should be run first to create the plugin config, readme, directory, and `package.json`/`docker-compose.yml` changes necessary to make the plugin available to WordPress. The second is `npm run generate:custom-block`, which creates the boilerplate files necessary to create a single custom block within the plugin. +To implement custom blocks, begin by using the two [generators](#generators) in tandem to create the necessary scaffolding for custom blocks. The first is `npm run generate:custom-blocks-plugin`, which should be run first to create the plugin config, readme, directory, and `package.json`/`docker-compose.yml` changes necessary to make the plugin available to WordPress. The second is `npm run generate:custom-block`, which creates the boilerplate files necessary to create a single custom block within the plugin. Note: you will need to restart your development process to pick up the changes after adding a custom blocks plugin and/or a custom block. From d77c576f806784b0dc9f3ecf1d770e157d636e9a Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Fri, 3 Nov 2023 10:34:36 -0600 Subject: [PATCH 13/13] docs: remove unnecessary sparkbox reference --- CONTRIBUTING.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c6ba202..33274d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,6 @@ Here's a few things you should know before you submit your PR: - Ensure tests pass: `npm test` - Make changes and then make sure the linters and tests still pass - Push your branch/fork and [submit a PR][pr] -- Assign a [sparkboxer][contributors] to review your PR ## Commit Style @@ -44,5 +43,4 @@ feature: add new linting rule for ... [issues]: ./issues [pr]: ./compare -[contributors]: ./graphs/contributors [conventional commits]: https://www.conventionalcommits.org/en/v1.0.0/