You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-25Lines changed: 19 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
# DDEV Drupal Contrib
7
7
8
-
DDEV integration for developing Drupal contrib projects. As a general philosophy, your contributed module is the center of the universe. The codebase layout (see image below) and commands in this project [match the Gitlab CI approach](https://git.drupalcode.org/project/gitlab_templates) from the Drupal Association.
8
+
DDEV integration for developing Drupal contrib projects. As a general philosophy, your contributed module/theme is the center of the universe. The codebase layout (see image below) and commands in this project [match the Gitlab CI approach](https://git.drupalcode.org/project/gitlab_templates) from the Drupal Association.
9
9
10
10
11
11
## Install
@@ -93,14 +93,12 @@ In `.ddev/config.local.yaml` set the location relative to webroot (which usually
93
93
```yaml
94
94
web_environment:
95
95
- ...
96
-
- DRUPAL_PROJECTS_PATH=modules
96
+
- DRUPAL_PROJECTS_PATH=modules/custom
97
97
```
98
98
99
99
Then run `ddev restart` to update the symlink location.
100
100
101
-
All [ddev-drupal-contrib commands](#commands) run against your project code in the configured symlink location.
102
-
103
-
To use with Drupal themes, set `DRUPAL_PROJECTS_PATH=themes/custom` in your config.
101
+
To use with Drupal themes, set `DRUPAL_PROJECTS_PATH=themes/custom` in your config.local.yaml.
104
102
105
103
## Example of successful test
106
104
@@ -138,11 +136,22 @@ ddev phpcbf -q
138
136
139
137
3. Mark the file as executable: `chmod +x pre-commit`.
140
138
141
-
## Add-on tests
139
+
## Troubleshooting
140
+
141
+
"Error: unknown command":
142
+
143
+
The commands from this addon are available when the project type is `drupal`. Make sure the `type` configuration is correctly set in `.ddev/config.yaml`:
144
+
145
+
```yaml
146
+
type: drupal
147
+
```
148
+
149
+
> [!TIP]
150
+
> Remember to run `ddev restart` if `.ddev/config.yaml` has been updated.
142
151
143
-
Tests are done with Bats. It is a testing framework that uses Bash.
152
+
## Contributing
144
153
145
-
To run tests locally you need to first install bats' git submodules with:
154
+
Tests are done with Bats. It is a testing framework that uses Bash. To run tests locally you need to first install bats' git submodules with:
146
155
147
156
```bash
148
157
git submodule update --init
@@ -160,30 +169,15 @@ variable.
160
169
i.e. `TEST_DRUPAL_CORE=11 ./tests/bats/bin/bats ./tests`.
161
170
162
171
Tests are triggered automatically on every push to the
163
-
repository, and periodically each night. The automated tests are agains all of
172
+
repository, and periodically each night. The automated tests are against all of
164
173
the supported Drupal core versions.
165
174
166
-
Please make sure to attend to test failures when they happen. Others will be
167
-
depending on you.
168
-
169
-
Also, consider adding tests to test for bugs or new features on your PR.
175
+
Also, consider adding tests in your PR.
170
176
171
177
To learn more about Bats see the [documentation][bats-docs].
The commands from this addon are available when the project type is `drupal`. Make sure the `type` configuration is correctly set in `.ddev/config.yaml`:
180
-
181
-
```yaml
182
-
type: drupal
183
-
```
184
-
185
-
Don't forget to run `ddev restart` if `.ddev/config.yaml` has been updated.
186
-
187
181
## Credits
188
182
189
183
Contributed and maintained by Moshe Weitzman ([@weitzman](https://github.com/weitzman)) and
0 commit comments