2017 © Pedro Peláez
 

project drupal-composer-boilerplate

Composer template for Drupal 8 projects with docksal

image

seregatte/drupal-composer-boilerplate

Composer template for Drupal 8 projects with docksal

  • Monday, December 4, 2017
  • by seregatte
  • Repository
  • 1 Watchers
  • 0 Stars
  • 62 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Composer template for Drupal 8 projects with docksal

This project template should provide a kickstart for managing your site dependencies with Composer and infrastructure with Docker via Docksal., (*1)

Requirements

  • Docker 1.11+ ->
  • Docker Composer 1.7+ ->
  • PHP cli stack and composer (Optional) ->

Usage

You can create the project via composer or via composer inside a docker., (*2)

If you have a php cli stack and composer, try this:, (*3)

composer create-project seregatte/drupal-composer-boilerplate some-dir --stability dev --no-interaction

or if you prefer run via docker:, (*4)

docker run --rm -v $(pwd):/app composer/composer create-project seregatte/drupal-composer-boilerplate some-dir --stability dev --no-interaction

With composer require ... or running the same command on docker, you can download new dependencies to your installation., (*5)

cd some-dir
composer require drupal/ctools:8.*

or, (*6)

cd some-dir
docker run --rm -v $(pwd):/app composer/composer require drupal/ctools:8.*

What does the template do?

When installing the given composer.json some tasks are taken care of:, (*7)

  • Drupal will be installed in the web-directory.
  • Modules (packages of type drupal-module) will be placed in web/sites/all/modules/contrib/
  • Theme (packages of type drupal-module) will be placed in web/sites/all/themes/contrib/
  • Profiles (packages of type drupal-profile) will be placed in web/profiles/
  • Docker stack will be placed in infrastructure/environment/development/docker
  • Makefile will be placed in project's root folder

FAQ

Should I commit the contrib modules I download

Composer recommends no. They provide argumentation against but also workrounds if a project decides to do it anyway., (*8)

How can I apply patches to downloaded modules?

If you need to apply patches (depending on the project being modified, a pull request is often a better solution), you can do so with the composer-patches plugin., (*9)

To add a patch to drupal module foobar insert the patches section in the extra section of composer.json:, (*10)

"extra": {
    "patches": {
        "drupal/foobar": {
            "Patch description": "URL to patch"
        }
    }
}

The Versions

31/07 2016

7.x-dev

7.9999999.9999999.9999999-dev

Composer template for Drupal projects

  Sources   Download

GPL-2.0+

The Requires