2017 © Pedro Peláez
 

project zeus-project

Project template for Drupal 8 sites built with the Zues distribution.

image

xenomedia/zeus-project

Project template for Drupal 8 sites built with the Zues distribution.

  • Monday, April 17, 2017
  • by xenomedia
  • Repository
  • 2 Watchers
  • 0 Stars
  • 41 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

This is a Composer-based installer for the Zues Drupal distribution., (*1)

Get Started

You will need the following installed:, (*2)

  • Composer, obviously
  • Node, which includes the NPM package manager

When you have those, run this command:, (*3)

$ composer create-project xenomedia/zeus-project:^8.3.0 MY_PROJECT --no-interaction --stability rc

Maintenance

drush make, drush pm-download, drush pm-update and their ilk are the old-school way of maintaining your code base. Forget them. You're in Composer land now!, (*4)

Let this handy table be your guide:, (*5)

Task Drush Composer
Installing a contrib project (latest version) drush pm-download PROJECT composer require drupal/PROJECT:8.*
Installing a contrib project (specific version) drush pm-download PROJECT-8.x-1.0-beta3 composer require drupal/PROJECT:8.1.0-beta3
Updating all contrib projects and Drupal core drush pm-update composer update
Updating a single contrib project drush pm-update PROJECT composer update drupal/PROJECT
Updating Drupal core drush pm-update drupal composer update drupal/core

Not too tricky, eh?, (*6)

The magic is that Composer, unlike Drush, is a dependency manager. If module foo-8.x-1.0 depends on baz-8.x-3.2, Composer will not let you update baz to 8.x-3.3 (or downgrade it to 8.x-3.1, for that matter). Drush has no concept of dependency management. If you've ever accidentally hosed a site because of dependency issues like this, you've probably already realized how valuable Composer can be., (*7)

But to be clear: you still need Drush. Tasks such as database updates (drush updatedb) are still firmly in Drush's province, and it's awesome at that stuff. This installer will install a copy of Drush (local to the project) in the bin directory., (*8)

Composer is only responsible for maintaining the code base., (*9)

Source Control

If you peek at the .gitignore we provide, you'll see that certain directories, including all directories containing contributed projects, are excluded from source control. This might be a bit disconcerting if you're newly arrived from Planet Drush, but in a Composer-based project like this one, you SHOULD NOT commit your installed dependencies to source control., (*10)

When you set up the project, Composer will create a file called composer.lock, which is a list of which dependencies were installed, and in which versions. Commit composer.lock to source control! Then, when your colleagues want to spin up their own copies of the project, all they'll have to do is run composer install, which will install the correct versions of everything in composer.lock., (*11)

The Versions