{"action":"created","issue":{"url":"https://api.github.com/repos/aquifer/aquifer/issues/131","repository_url":"https://api.github.com/repos/aquifer/aquifer","labels_url":"https://api.github.com/repos/aquifer/aquifer/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/aquifer/aquifer/issues/131/comments","events_url":"https://api.github.com/repos/aquifer/aquifer/issues/131/events","html_url":"https://github.com/aquifer/aquifer/pull/131","id":153540383,"number":131,"title":"Composer","user":{"login":"generalredneck","id":526491,"avatar_url":"https://avatars.githubusercontent.com/u/526491?v=3","gravatar_id":"","url":"https://api.github.com/users/generalredneck","html_url":"https://github.com/generalredneck","followers_url":"https://api.github.com/users/generalredneck/followers","following_url":"https://api.github.com/users/generalredneck/following{/other_user}","gists_url":"https://api.github.com/users/generalredneck/gists{/gist_id}","starred_url":"https://api.github.com/users/generalredneck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/generalredneck/subscriptions","organizations_url":"https://api.github.com/users/generalredneck/orgs","repos_url":"https://api.github.com/users/generalredneck/repos","events_url":"https://api.github.com/users/generalredneck/events{/privacy}","received_events_url":"https://api.github.com/users/generalredneck/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aquifer/aquifer/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-06T21:19:48Z","updated_at":"2016-05-06T22:54:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aquifer/aquifer/pulls/131","html_url":"https://github.com/aquifer/aquifer/pull/131","diff_url":"https://github.com/aquifer/aquifer/pull/131.diff","patch_url":"https://github.com/aquifer/aquifer/pull/131.patch"},"body":"This is a \"pre-abstraction\" level of build...\r\n\r\nEventually we would like to make it so that the build system could be controlled by extensions so they can provide their own commands to run as part of the build.\r\n\r\nAdditionally, allowing a build plugin to hook into create would allow one to set up a default project with the neccessary files to make a build work. Composer is an example of this type of scenario. Drush is too actually. \r\n\r\nDrush requires a drush.make.yml file, composer requires a composer.json file and a couple of supporting scripts.\r\n\r\nThis builds composer support for a modified version of drupal-composer/drupal-project. I've only tested this with Drupal 8. I've not successfully tested this build with a core like pantheon/drops-8. (that particular one was very difficult to write a composer.json for because they commit the vendor folder)\r\n\r\nThere are some scaffolding that drupal-composer/drupal-scaffold builds that I had to remove so that aquifer wouldn't fail. This is part of the afterBuild callback.\r\n\r\nThe steps to get a build working is something of the following:\r\n* run `aquifer create test`\r\n* modify aquifer.json to have\r\n  \r\n  ```\r\n   \"build\": {\r\n      \"method\": \"composer\",\r\n      \"directory\": \"build\",\r\n      \"makeFile\": \"composer.json\"\r\n    } \r\n  ```\r\n* download [drupal-composer/drupal-project: 8.x](https://github.com/drupal-composer/drupal-project/archive/8.x.zip)\r\n* copy composer.json and the scripts directory into your test project\r\n* change all instances of \"web\" in both composer.json and scripts/composer/ScriptHandler.php to whatever `build.directory` is in aquifer.json. In this case \"build\".\r\n* Add the following to composer.json \r\n  \r\n  ```\r\n    \"config\": {\r\n        \"vendor-dir\": \"build/vendor\"\r\n    }\r\n  ```\r\n\r\nThis will get you a basic build"},"comment":{"url":"https://api.github.com/repos/aquifer/aquifer/issues/comments/217582689","html_url":"https://github.com/aquifer/aquifer/pull/131#issuecomment-217582689","issue_url":"https://api.github.com/repos/aquifer/aquifer/issues/131","id":217582689,"user":{"login":"thebruce","id":590058,"avatar_url":"https://avatars.githubusercontent.com/u/590058?v=3","gravatar_id":"","url":"https://api.github.com/users/thebruce","html_url":"https://github.com/thebruce","followers_url":"https://api.github.com/users/thebruce/followers","following_url":"https://api.github.com/users/thebruce/following{/other_user}","gists_url":"https://api.github.com/users/thebruce/gists{/gist_id}","starred_url":"https://api.github.com/users/thebruce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thebruce/subscriptions","organizations_url":"https://api.github.com/users/thebruce/orgs","repos_url":"https://api.github.com/users/thebruce/repos","events_url":"https://api.github.com/users/thebruce/events{/privacy}","received_events_url":"https://api.github.com/users/thebruce/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T22:54:54Z","updated_at":"2016-05-06T22:54:54Z","body":"Functional works here. Aquifer build does all the composer things!\r\n\r\nNote for testing: Preserve the file structure of scripts/composer/ScriptHandler.php\r\n\r\nThat's probably obvious to anybody, but i messed up on the first go.\r\n"}}