-
Notifications
You must be signed in to change notification settings - Fork 2
/
DEVELOP.md.tpl
106 lines (67 loc) · 2.2 KB
/
DEVELOP.md.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# <%= name %>
## Develop
1. Make sure you have `docker` and `docker compose` installed and running on your machine:
```Bash
git clone https://github.com/eea/<%= name %>.git
cd <%= name %>
git checkout -b bugfix-123456 develop
make
make start
```
1. Wait for `Volto started at 0.0.0.0:3000` meesage
1. Go to http://localhost:3000
1. Initialize git hooks
```Bash
yarn prepare
```
1. Happy hacking!
### Or add <%= addonName %> to your Volto project
Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
npm install -g yo @plone/generator-volto mrs-developer
1. Create new volto app
yo @plone/volto my-volto-project --addon <%= addonName %> --skip-install
cd my-volto-project
1. Add the following to `mrs.developer.json`:
{
"<%= name %>": {
"url": "https://github.com/eea/<%= name %>.git",
"package": "<%= addonName %>",
"branch": "develop",
"path": "src"
}
}
1. Install
make develop
yarn
1. Start backend
docker run --pull always -it --rm --name plone -p 8080:8080 -e SITE=Plone plone/plone-backend
...wait for backend to setup and start - `Ready to handle requests`:
...you can also check http://localhost:8080/Plone
1. Start frontend
yarn start
1. Go to http://localhost:3000
1. Happy hacking!
cd src/addons/<%= name %>/
## Cypress
To run cypress locally, first make sure you don't have any Volto/Plone running on ports `8080` and `3000`.
You don't have to be in a `clean-volto-project`, you can be in any Volto Frontend
project where you added `<%= name %>` to `mrs.developer.json`
Go to:
```BASH
cd src/addons/<%= name %>/
```
Start:
```Bash
make
make start
```
This will build and start with Docker a clean `Plone backend` and `Volto Frontend` with `<%= name %>` block installed.
Open Cypress Interface:
```Bash
make cypress-open
```
Or run it:
```Bash
make cypress-run
```