An opinionated development environment for brewing Drupal Canvas, built with DDEV. I maintain this project to use for my day-to-day development work, with workflows and tools I prefer.
- Clone the repository
- Copy
.ddev/.env.exampleto.ddev/.env- Add your OpenAI API key to be used by the Canvas AI module
- Run
ddev start
| Command | Description |
|---|---|
n |
Run npm inside the UI directory.--canvas-dir=<directory>: runs npm inside specified directory( root, ui, astro, cli, or docs) |
ui |
Start the UI app's dev server.--install -i: runs npm install before--build -b: runs npm run build before |
playwright |
Run Playwright in UI mode. (Accessible via VNC at https://canvas.ddev.site:6081/vnc.html)--spec <path-to-spec>: runs a spec in headless mode |
cy,cypress |
Run the Cypress UI in end-to-end testing mode (Accessible via VNC at https://canvas.ddev.site:6081/vnc.html)--spec <path-to-spec>: runs a spec in headless mode--component -c: use component testing mode |
phpunit [path] |
Run PHPUnit tests in the module's codebase[path]: narrows to the path, relative to the module directory |
phpcs [path] |
Run PHP Code Beautifier and Fixer in the module's codebase[path]: narrows to the path, relative to the module directory |
phpstan |
Run PHPStan in the module's codebase |
si,site-install |
Install Drupal site, install and configure modules: Canvas, Canvas AI, Canvas OAuth.--no-vite: skips installing Canvas Vite |
clone-repo |
Clone the Canvas module's repository. (Runs on the host.) |
See the list of commands provided by DDEV out-of-the box.
My work on Drupal Canvas is made possible by Acquia.