Building the site
build assembles the codebase in the build directory, starts the PHP webserver and installs the Drupal website with your extension enabled. Your extension's files are symlinked into the site, so an edit in your project shows up in the site straight away, and CI builds it the same way.
- Make
- Ahoy
- No wrapper
make build
ahoy build
scripts/eddy-tooling # Install the tooling
vendor/bin/eddy-assemble # Assemble the codebase
vendor/bin/eddy-start # Start the PHP server
vendor/bin/eddy-provision # Provision the Drupal website
What build runs
build stops a webserver that's still running from an earlier build, then runs 3 commands in turn, and each one runs your lifecycle scripts for its phase:
- Make
- Ahoy
- No wrapper
make assemble # Assemble the codebase
make start # Start the PHP server
make provision # Provision the Drupal website
ahoy assemble # Assemble the codebase
ahoy start # Start the PHP server
ahoy provision # Provision the Drupal website
vendor/bin/eddy-assemble # Assemble the codebase
vendor/bin/eddy-start # Start the PHP server
vendor/bin/eddy-provision # Provision the Drupal website
Run them on their own when you only need part of the job. provision reinstalls the website without reassembling the codebase, which is much faster when only the site's state needs a reset.
Assembling the codebase
assemble builds a fresh codebase every time, in this order:
- It checks your extension and the tools it uses, and resolves the Drupal release to build from
DRUPAL_VERSION(see Drupal versions). - It checks that the PHP running the build meets that release's PHP requirement, and stops before it touches
buildwhen it doesn't. - It removes the old
builddirectory and creates a Drupal project from drupal/recommended-project, with core pinned to the resolved release. - It merges the development dependencies and settings of
composer.dev.jsonand your extension'scomposer.jsoninto the project, and pins the PHP platform. - It installs the dependencies, applies your patches, and adds the extensions you
suggest. - It copies the configuration files of the linters and PHPUnit into
build, because not every tool resolves a symlinked configuration file correctly. - It symlinks every top-level file and directory of your project into the site, apart from
buildandvendor:web/modules/custom/<your_extension>for a module, orweb/themes/custom/<your_extension>for a theme. - It runs
npm ciandnpm run buildinbuildwhen your project has apackage-lock.jsonand no.skip_npm_buildfile (see Frontend dependencies). - It runs your
scripts/assemble-*.shlifecycle scripts.
The build lists every dependency it installed from a development branch rather than a release, so you can see when a build leans on unreleased code.
Other commands along the way
info(aliasdescribe) prints a read-only summary of the environment: the PHP, Drupal, Composer, Drush, Node.js and npm versions, the webserver host and port with where each came from, the site URL, the XDebug state, the WebDriver port, the build directory, the database path and the install profile.reset(aliasesdeleteanddestroy) stops the project's webserver and browser, and removes thebuild,.logsandvendordirectories. Removingvendoris also how a local checkout picks up a newer patch release of the tooling.make helplists themakecommands, since a baremakerunsbuildinstead. A bareahoylists the Ahoy ones.
- Make
- Ahoy
- No wrapper
make info # Summarize the environment
make reset # Remove build, .logs and vendor
ahoy info # Summarize the environment
ahoy reset # Remove build, .logs and vendor
vendor/bin/eddy-info # Summarize the environment
vendor/bin/eddy-info also prints a single field when you name it, such as vendor/bin/eddy-info site-url, which is how the wrappers find the site URL.
Seeing the full output
The build hides the output of Composer, npm and Drush unless a command fails, so a normal run shows only its own progress. When something goes wrong, the failing command's output appears. To watch everything as it happens, set DEBUG=1:
- Make
- Ahoy
- No wrapper
DEBUG=1 make build
DEBUG=1 ahoy build
export DEBUG=1
vendor/bin/eddy-assemble
vendor/bin/eddy-start
vendor/bin/eddy-provision
Debugging covers the logs of the processes that keep running after a command returns.
Your extension's contributors
The CONTRIBUTING.md that the installer generates documents these commands for the people who work on your extension, with only the command wrappers and tools you kept.