From 913be94c1b5f1e1ad643efd454561ae7768fbb32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Sch=C3=B6ldstr=C3=B6m?= Date: Mon, 6 Jun 2016 11:35:44 -0400 Subject: [PATCH] Issue #704: Take root composer.json into account in docs on Drupal VM as a dependency --- docs/other/drupalvm-composer-dependency.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/other/drupalvm-composer-dependency.md b/docs/other/drupalvm-composer-dependency.md index e6d58c64f..5d143470e 100644 --- a/docs/other/drupalvm-composer-dependency.md +++ b/docs/other/drupalvm-composer-dependency.md @@ -15,9 +15,9 @@ Add and configure the `config.yml` anywhere you like, in this example we place i _Note: This will be the directory where Drupal VM looks for other local configuration files as well. Such as [`local.config.yml` and `Vagrantfile.local`](overriding-configurations.md)._ ``` +├── composer.json ├── config/ │ ├── config.yml -│ ├── drupal.make.yml │ ├── local.config.yml │ └── Vagrantfile.local ├── docroot/ @@ -29,6 +29,16 @@ _Note: This will be the directory where Drupal VM looks for other local configur └── drupal-vm/ ``` +Change the build strategy to use your `composer.json` file by setting: + +```yaml +build_composer_project: false +build_composer: true +drupal_composer_path: false +drupal_composer_install_dir: "/var/www/drupalvm" +drupal_core_path: "{{ drupal_composer_install_dir }}/docroot" +``` + If you're using `pre_provision_scripts` or `post_provision_scripts` you also need to adjust their paths to take into account the new directory structure. The examples used in `default.config.yml` assume the files are located in the Drupal VM directory. If you use relative paths you need to the ascend the directory tree as far as the project root, but using the `config_dir` variable you get the absolute path of where you `config.yml` is located. ```yaml @@ -66,7 +76,6 @@ Your project structure should now look like this: ├── composer.json ├── config/ │ ├── config.yml -│ ├── drupal.make.yml │ ├── local.config.yml │ └── Vagrantfile.local ├── docroot/ @@ -117,7 +126,6 @@ Your directory structure should now look like this: ``` ├── Vagrantfile ├── config/ -│ ├── drupal.make.yml │ ├── config.yml │ ├── local.config.yml │ └── Vagrantfile.local