xwp/block-scaffolding-wp

Consider removing bundled Vagrant and Docker environments

Closed this issue · 3 comments

The bundled Vagrant and Docker environments are a nice addition.

But there have been a few candidates that needed support with the environments. For example, one reported that they could not find the wp-content/ directory in the Vagrant environment.

Also, vagrant up failed for me with:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

 setup

Stdout from the command:

Stderr from the command:

bash: line 4: setup: command not found

These issues might all have solutions.

But I think candidates could be distracted in setting up the environments. I've used this plugin in my own VVV environment fine.

Or instead of removing the bundled environment, maybe:

diff --git a/readme.md b/readme.md
index 154e632..411f1c9 100644
--- a/readme.md
+++ b/readme.md
@@ -19,12 +19,14 @@
 
           npm install
 
-3. Start a virtual testing environment using [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/):
+3. If you need a WordPress development environment, start one using [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/):
 
           vagrant up
 
        which will be available at [blockextend.local](http://blockextend.local) after provisioning (username: `admin`, password: `password`).
 
+       This is optional, and this plugin should still run in a typical WordPress development environment.
+
        Alternatively, run it on your local Docker host:

This is great feedback @kienstra! The instructions definitely make it sound like the dev environment is required for working on the plugin while in fact it's not -- it works with any kind of local setup as long as it has WordPress somewhere :)

The purpose of having some kind of bundled environment is to simplify the development as much as possible, similar to how Composer and npm take care of pulling in all the project dependencies, so I would like to suggest that we leave in the dev environment and rework the instructions per your suggestion.

The Vagrant "wrapper" serves as a helper for users who don't want to install Docker locally or want to isolate the development environment for this plugin from the rest of their system. Ideally, the dev environment should be disposable and super quick to re-create at any point. Ideally, the same development environment could be used for running the test and build pipelines but we're not using it for that purpose yet.

Sounds good, @kasparsd! I'll rework the PR (#15) to simply modify the readme.md.

In the PR (#15), I reverted the removal of the files, and mentioned in the readme.md that the environment is optional.