Update readme files to correspond to the new repository structure

[MAILPOET-3919]
This commit is contained in:
Jan Jakes
2022-01-17 11:44:16 +01:00
committed by Veljko V
parent 75fb5c0030
commit ffd4feaccc
2 changed files with 32 additions and 21 deletions

View File

@@ -1,6 +1,10 @@
# MailPoet
The **MailPoet** plugin.
MailPoet done the right way.
To use the official Docker-based development environment, see details
in [the readme file](../readme.md) in the root of this repository. If
you'd like to use the plugin code directly, you can follow the instructions
below.
# Contents
@@ -17,22 +21,26 @@ MailPoet done the right way.
- WordPress
## Installation
The instructions below assume you already have a working WordPress development environment.
The instructions below assume you already have a working WordPress development environment:
```bash
# go to WP plugins directory
$ cd path_to_wp_directory/wp-content/plugins
# clone this repository
$ git clone https://github.com/mailpoet/mailpoet.git
$ cd mailpoet
# create the .env file
$ cp .env.sample .env
# change the values on .env file
# install all dependencies (PHP and JS)
$ ./do install
# compile JS and CSS files
$ ./do compile:all
# 1. Clone this repository somewhere outside the WordPress installation:
git clone https://github.com/mailpoet/mailpoet.git
# 2. Go to the plugin directory within cloned the repository:
cd mailpoet/mailpoet
# 3. Symlink the MailPoet plugin to your WordPress installation:
ln -s $(pwd) <wordpress>/wp-content/plugins/mailpoet
# 4. Create the .env file:
cp .env.sample .env
# 5. Install dependencies (PHP and JS):
./do install
# 6. Compile JS and CSS:
./do compile:all
```
####Note for NVM users
In case you use nvm for node versions management you may need to create or update `~/.huskyrc` with:

View File

@@ -1,9 +1,12 @@
# MailPoet
The **MailPoet** development environment.
The **MailPoet** plugin monorepo.
To use our Docker-based development environment (recommended), continue with the steps below.
If you'd like to use the plugin code directly, see details in [the plugin's readme](mailpoet/README.md).
## 🔌 Initial setup
1) Run `./do setup` to pull everything and install necessary dependencies.
2) Add secrets to `.env` files in `mailpoet-dev-env/mailpoet` and `mailpoet-dev-env/mailpoet-premium`. Go to the Secret Store and look for "MailPoet: plugin .env"
2) Add secrets to `.env` files in `mailpoet` and `mailpoet-premium` directories. Go to the Secret Store and look for "MailPoet: plugin .env"
3) Run `./do start` to start the stack.
4) Go to http://localhost:8888 to see the dashboard of the dev environment.
@@ -12,9 +15,9 @@ The **MailPoet** development environment.
In `Languages & Preferences > PHP > Servers` set path mappings:
```shell
mailpoet-dev-env/wordpress -> /var/www/html
mailpoet-dev-env/mailpoet -> /var/www/html/wp-content/plugins/mailpoet
mailpoet-dev-env/mailpoet-premium -> /var/www/html/wp-content/plugins/mailpoet-premium
wordpress -> /var/www/html
mailpoet -> /var/www/html/wp-content/plugins/mailpoet
mailpoet-premium -> /var/www/html/wp-content/plugins/mailpoet-premium
```
For PHP 8 and XDebug 3 we support **browser debugging extension**.
@@ -63,7 +66,7 @@ You can access this help in your command line running `./do` without parameters.
[Read the article.](https://mailpoet.atlassian.net/wiki/spaces/MAILPOET/pages/629374977/Adding+new+templates+to+the+plugin)
## 🚥 Testing with PHP 7.4 or PHP 8.1
To switch the environment to PHP 7.4/8.1:
To switch the environment to PHP 7.4/8.1:
1) Configure the `wordpress` service in `docker-compose.override.yml` to build from the php74 Dockerfile:
```yaml