Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit e1779d9

Browse files
committed
Issue #704: Fix some issues with Composer docs and add acquia/lightning-project as example
1 parent 23f28df commit e1779d9

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

docs/deployment/composer.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ Drupal VM is configured to use `composer create-project` to build a Drupal 8 cod
33
## Using composer.json
44

55
1. Copy `example.drupal.composer.json` to `drupal.composer.json` and modify it to your liking.
6-
2. Use the Composer build system by setting `build_composer: true` in your `config.yml` (make sure `build_makefile` is set to `false`).
6+
2. Use the Composer build system by setting `build_composer: true` in your `config.yml` (make sure `build_makefile` and `build_composer_project` are set to `false`).
77
3. Configure `drupal_core_path` to point to the webroot directory: `drupal_core_path: {{ drupal_composer_install_dir }}/docroot`
88

99
```yaml
10-
build_makefile: false
10+
build_composer_project: false
1111
build_composer: true
1212
drupal_core_path: "{{ drupal_composer_install_dir }}/docroot"
1313
```
1414
15-
_The file set in `drupal_composer_path` (which defaults to `drupal.composer.json`) will be copied from your host computer into the VM's `drupal_composer_install_dir` and renamed `composer.json`. If you already have a composer.json within that directory, you can set `drupal_composer_path: false`._
15+
_The file set in `drupal_composer_path` (which defaults to `drupal.composer.json`) will be copied from your host computer into the VM's `drupal_composer_install_dir` and renamed `composer.json`. If you already have a composer.json within that directory, set `drupal_composer_path: false`._
1616

1717
## Using Composer when [Drupal VM is a composer dependency itself](../other/drupalvm-composer-dependency.md)
1818

19-
In the scenario where you already have an existing `composer.json` in the root of your project, follow the usual steps for installing with a composer.json but instead of creating a `drupal.composer.json` file, disable the transfering of the file by setting `drupal_composer_path` to `false`, and change `drupal_composer_install_dir` to point to the the directory where it will be located. If `drupal_composer_path` is not truthy, Drupal VM assumes it already exists.
19+
In the scenario where you already have an existing `composer.json` in the root of your project, follow the usual steps for installing with a composer.json but instead of creating a `drupal.composer.json` file, disable the transfering of the file by setting `drupal_composer_path: false`, and change `drupal_composer_install_dir` to point to the the directory where it will be located. If `drupal_composer_path` is not truthy, Drupal VM assumes it already exists.
2020

2121
```yaml
22-
build_makefile: false
22+
build_composer_project: false
2323
build_composer: true
2424
drupal_composer_path: false
2525
drupal_composer_install_dir: "/var/www/drupalvm"
@@ -33,22 +33,14 @@ This is the default Drupal VM build configuration, set up by the following setti
3333
- Composer will build the project if `build_composer_project` is `true`, and `build_makefile` and `build_composer` are both `false`.
3434
- The Composer package is defined by `drupal_composer_project_package`.
3535
- Adjust the create-project CLI options in `drupal_composer_project_options` as well as add additional dependencies in `drupal_composer_dependencies`.
36-
- Ensure that the webroot configured in the Composer package matches the one set in `drupal_core_path`.
36+
- Ensure that the webroot configured in the Composer package matches the one set in `drupal_core_path`. The default is set to `web/`.
3737

38-
With [drupal-composer/drupal-project](https://github.com/drupal-composer/drupal-project) as an example your `config.yml` settings would be:
38+
With [acquia/lightning-project](https://github.com/acquia/lightning-project) as an example your `config.yml` settings would be:
3939

4040
```yaml
41-
build_makefile: false
42-
build_composer: false
43-
build_composer_project: true
44-
45-
drupal_composer_project_package: "drupal-composer/drupal-project:8.x-dev"
46-
# Added `--no-dev` to avoid installing development dependencies.
47-
drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction --no-dev"
48-
drupal_composer_dependencies:
49-
- "drupal/devel:8.*"
50-
51-
drupal_core_path: "{{ drupal_composer_install_dir }}/web"
41+
drupal_composer_project_package: "acquia/lightning-project:^8.1.0"
42+
drupal_composer_project_options: "--prefer-dist --stability rc --no-interaction"
43+
drupal_core_path: "{{ drupal_composer_install_dir }}/docroot"
5244
```
5345

5446
## Improving composer build performance

docs/deployment/local-codebase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Set all the `build_` variables and `install_site` to `false`:
1818
```yaml
1919
build_makefile: false
2020
build_composer: false
21-
build_composer_project: true
21+
build_composer_project: false
2222
...
2323
install_site: false
2424
```

0 commit comments

Comments
 (0)