Skip to content

fago/drupal-canvas-dev

 
 

Repository files navigation

drupal-canvas-dev

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.

Setup

  1. Clone the repository
  2. Copy .ddev/.env.example to .ddev/.env
    1. Add your OpenAI API key to be used by the Canvas AI module
  3. Run ddev start

Commands

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.

Credits

My work on Drupal Canvas is made possible by Acquia.

About

An opinionated development environment for brewing Drupal Canvas.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 95.4%
  • PHP 4.6%