No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts
web
.gitignore
LICENSE
composer.json
composer.lock
readme.md

readme.md

Drupal Composer project template

##Introduction This is an example project demonstrating how to manage core, contrib modules, custom modules, features, cusotm install profiles and custom themes with Composer. For more information see here: http://neilcameron.me/#!/blog/post/18

##Initial install All dependencies are managed via Composer. To get your drupal instance, you need to install via composer:

  1. Install composer locally. See here.
  2. Run composer install
  3. Install drupal as you normally would.

##How modules and dependencies are managed

  • Contrib modules (e.g. Views, Ctools) are managed as composer dependencies, these are pulled in when the application is installed.
  • Third party libraries (e.g. CKEditor) are also composer dependencies.
  • Custom modules, themes, features and profiles are version controlled and located in the webroot.

Note: although it is recommended that dependencies should not be committed to the repo, there is currently no elegant way to pull in custom modules other than storing them in their own repository, which would lead to unwanted complexity. However, [Pantheon reccomend](https://github.com/pantheon-systems/example-drupal7-travis-composer/tree/master#re pository-management) commiting custom modules in there place and ignoring everything else. This provides a relatively elegant solution where all code is managed in a single repo repository with all external dependencies managed via composer.

The code and repository are managed with a combination of the .gitignore file and the Composer preserve paths plugin.

##How to add new contrib modules To add a new contrib module to the project just run composer require ... e.g. composer require drupal/ctools:7.*. This must be run from the root of the project (not the docroot). If you are unsure of the package name, check it on https://packagist.drupal-composer.org.

##How to add new custom modules Simply add them to sites/all/modules/custom and commit them to the repository.

##Shoutouts This would not be possible without the work of many others including: