2017 © Pedro Peláez
 

project df-project

Project template for Drupal 8 sites built with the Demo Framework distribution.

image

acquia/df-project

Project template for Drupal 8 sites built with the Demo Framework distribution.

  • Tuesday, June 5, 2018
  • by matthewmorley
  • Repository
  • 306 Watchers
  • 6 Stars
  • 656 Installations
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 7 Versions
  • 8 % Grown

The README.md

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

Get Started

$ composer create-project acquia/df-project MY_PROJECT -s dev

Composer will create a new directory called MY_PROJECT containing a docroot directory with a full Demo Framrwork code base therein. You can then install it like you would any other Drupal site., (*2)

If you need help getting an environment going, we recommend using DDev or Acquia Developer Studio. It's also possible to quickly spin up a site using the runserver command for drush and a local sqlite database., (*3)

drush runserver, (*4)

drush site-install --db-url=sqlite://../df.sqlite, (*5)

Other tested environments for DF include Acquia Dev Desktop, Acquia Cloud and Acquia Cloud Site Factory., (*6)

Maintenance

Once you've started a new project based on this one, you'll want to add more extensions. Let this handy table be your guide:, (*7)

Task Drush Composer
Installing a contrib project (latest version) drush pm-download PROJECT composer require drupal/PROJECT
Installing a contrib project (specific version) drush pm-download PROJECT-8.x-1.0-beta3 composer require drupal/PROJECT:1.0.0-beta3
Installing a javascript library (e.g. dropzone) drush pm-download dropzone composer require bower-asset/dropzone
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

The magic is that Composer, unlike Drush, is a dependency manager. If module foo version: 1.0.0 depends on baz version: 3.2.0, Composer will not let you update baz to 3.3.0 (or downgrade it to 3.1.0, 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., (*8)

But to be clear: it is still very helpful to use a site management tool like Drush or Drupal Console. Tasks such as database updates (drush updatedb) are still firmly in the province of such utilities. This installer will install a copy of Drush (local to the project) in the bin directory., (*9)

Specifying a version

you can specify a version from the command line with:, (*10)

$ composer require drupal/<modulename>:<version> 

For example:, (*11)

$ composer require drupal/ctools:3.0.0-alpha26
$ composer require drupal/token:1.x-dev 

In these examples, the composer version 3.0.0-alpha26 maps to the drupal.org version 8.x-3.0-alpha26 and 1.x-dev maps to 8.x-1.x branch on drupal.org., (*12)

If you specify a branch, such as 1.x you must add -dev to the end of the version., (*13)

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

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., (*15)

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., (*16)

The Versions

05/06 2018

dev-master

9999999-dev

Project template for Drupal 8 sites built with the Demo Framework distribution.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

27/03 2018

dev-8.x-3.x-lightning-dev

dev-8.x-3.x-lightning-dev

Project template for Drupal 8 sites built with the Demo Framework distribution.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires