|
| 1 | +# Setting up the environment |
| 2 | + |
| 3 | +### LAMP |
| 4 | + |
| 5 | +The very first step for starting contributing to Drupal Commerce is to setup a classic |
| 6 | +"LAMP" environment: that's a bit out of the scope of this document, so please |
| 7 | +take a look at [Drupal Installation Guide](https://drupal.org/documentation/install) |
| 8 | +and especially at its [System requirements section](https://drupal.org/requirements). |
| 9 | + |
| 10 | +### Drush |
| 11 | + |
| 12 | +Installing the powerful Drupal Shell is not mandatory but it can definitely be helpful during development. The recommended way to install it is through composer. Unfortunately, due to a (temporary?) dependency-clash between Drupal 8 and Drush 7, it's not possible to just install it within your Drupal 8's vendors directory. |
| 13 | +So fire the following in your terminal: |
| 14 | + |
| 15 | + composer global require drush/drush=dev-master |
| 16 | + |
| 17 | +### Drupal 8 |
| 18 | + |
| 19 | +Once you've got your system ready to host Drupal 8, the next step is to go and |
| 20 | +clone its repository in the directory where your web server will expect it to be |
| 21 | +by using the following command, being careful to replace "MINOR_VERSION" and "DESTINATION_DIRECTORY" as needed: |
| 22 | + |
| 23 | + git clone --branch 8.MINOR_VERSION.x http://git.drupal.org/project/drupal.git DESTINATION_DIRECTORY |
| 24 | + |
| 25 | +Please look at the [Drupal Git Instructions](https://drupal.org/project/drupal/git-instructions) |
| 26 | +for more information about how to clone Drupal. |
| 27 | + |
| 28 | +Once you finished cloning Drupal, set up a database for it and proceed with the |
| 29 | +installation: after it's completed, the only thing's missing is the Drupal Commerce |
| 30 | +module. |
| 31 | + |
| 32 | +### Drupal Commerce 2.x |
| 33 | + |
| 34 | +#### NOTE: you will need a working GitHub account for contributing. |
| 35 | + |
| 36 | +In order to start working on Drupal Commerce 2.x, you have to visit its |
| 37 | +[module page on GitHub](https://github.com/commerceguys/commerce) and click the **fork** |
| 38 | +button. |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +That will create a copy of the Drupal Commerce repository on your GitHub account. At this |
| 43 | +point you're ready to clone it in your working environment in a directory of your choice by using the following command (don't forget to replace YOUR_USER with |
| 44 | +the name of your GitHub user): |
| 45 | + |
| 46 | + git clone [email protected]:YOUR_USER/commerce.git |
| 47 | + |
| 48 | +Once you did all of that, symlink the cloned commerce directory under the Drupal's ``modules`` |
| 49 | +directory. |
| 50 | + |
| 51 | +**NOTE: directly cloning Drupal Commerce within Drupal's ``modules`` directory is discouraged for development.** |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +The only thing left to do now is to head to the module page clicking on the |
| 56 | +**Extend** button in the top menu and enable Drupal Commerce. |
| 57 | + |
| 58 | + |
0 commit comments