Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Latest commit

 

History

History
104 lines (70 loc) · 3.24 KB

install.md

File metadata and controls

104 lines (70 loc) · 3.24 KB

Installation

  1. Requirements
  2. Installation
  3. Ready?

Note: Browse the troubleshooting guide if you encounter any problems.

Requirements

The minimum software requirements to run Drupal 8 can be found at: https://www.drupal.org/requirements

The other essentials needed to run this solution are:

After we've configured PHP on your local environment we'll move on to installing these prerequisites.

PHP Configurations

Ensure your environment can run PHP from the command line with a php.ini configuration file loaded in. This will be essential for Drush and Phing to work.

You can test by running the following to identify PHP and the location of the configuration file

php --ini

If one isn't present, copy one using the default template supplied with PHP (you might need to sudo):

cp /etc/php.ini.default /etc/php.ini

In the php.ini file, ensure the date.timezone property is enabled and set with a timezone

[Date]
date.timezone = Europe/London

Drush 8

Drush 8 is required for Drupal 8. Install instructions can be found here.

NOTE: This documentation asks to clone the master branch of the drush repo which will contain a higher version than the one needed (9.x or above). Explore the Drush GitHub repo to determine which branch or tag release to checkout.

Alternatively you can use composer to install drush:

composer global require drush/drush 8.*

Installation

You can use our Docker images for an enhanced developer experience (see docker instructions.

Composer

To install the site dependencies you have to run

composer install

Once this is done you'll have all your dependencies in place to install your Drupal website.

In order to compile CSS you'll need to execute

composer grunt:build

and install drupal with

composer drupal:install

If you have any issue with the database please check the config of the file web/sites/default/settings.php.

Or you if you want to execute all those commands in one go - including some sample content provided by cr_default_content, you can run

composer campaign:build

Grunt

Grunt is a javascript task runner we've used to kick off various tasks within the build process.

Grunt will watch all SASS, TWIG, JS, images assets for changes and will:

  • Compile CSS
  • jshint JS
  • Generate compass image sprites
  • Add source sass map to help inspect sass files in browser inspector
  • Reload your browser (you need livereload chrome extension)

Grunt will compile CSS, remove comments, remove sass source file, minify and concatenate js.

You compile all SASS manually at anytime via the command below:

composer grunt:build

Ready?

You now have everything to start developing. But before you do have a read of Rules of the Road to understand and follow some guiding principles and best-practice approaches.