The ./vendor/bin/acms acms:install
command builds Composer dependencies each time the command is invoked, irrespective of whether the dependencies are already installed. Therefore, with this command, the system performs redundant activities.
To prevent redundancy and optimize the build process, you can leverage the following commands:
- Drupal Starter Kits build command:
./vendor/bin/acms acms:build
- Drupal Starter Kits install command:
./vendor/bin/acms site:install
These commands are created as splits from the ./vendor/bin/acms acms:install
command. With the split commands, you can perform tasks based on your specific use case.
Drupal Starter Kits build command
This command enables you to build your codebase once with Composer dependencies. The commands prompts you to answer questions that it can leverage to create the build.yml
file. This file is then reused by the Drupal Starter Kits install command. Therefore, you do not need to execute Composer commands repeatedly.
To use the Drupal Starter Kits build command:
Run
./vendor/bin/acms acms:build
.- Select the starter kit according to your use case.
- When prompted, enter your answers.
Wait until Composer builds your project with the selected starter kit.
Benefits
New customers
You can build your project once with the specific starter kit and use the generated build.yml
file to install sites elsewhere.
Existing customers
The Drupal Starter Kits build command provides the --generate
option to generate a build.yml
file from the existing project architecture. The Drupal Starter Kits install command can use this file to install the site anywhere.
./vendor/bin/acms acms:build --generate --uri <site_name>
Note
- The
--generate
option creates abuild.yml
file without execution of Composer dependencies. It only prompts for questions for selecting the specific starter kit. - If you do not provide the
–uri
parameter, the command uses default as the default site name. - If you provide the
–uri
parameter, the command adds or updates information in theacms/build.yml
with the specified uri.
Drupal Starter Kits install command
The ./vendor/bin/acms site:install
command installs the site by reading the build.yml
file. This command checks the acms/build.yml
file in the project root directory. If the build.yml
file does not exist, the command checks in the vendor/acquia/acquia-cms-starterkit/acms/build.yml
path and installs the site with default options.
- If you do not provide the
–uri
parameter, the command checks for the default key in theacms/build.yml
file and installs the site. - If you provide the
–uri
parameter and theacms/build.yml
file exists, the command installs a site for the specified uri. If the specified uri does not exist in theacms/build.yml
file, the command falls back to default and installs from default.
Note
The Drupal Starter Kits install command leverages all the options provided by the drush site:install
command. For example, –uri
.
Installing site from default:
Installing site from given uri: