previousnext / drupal-project
A starter kit for Drupal projects.
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 5
Forks: 2
Open Issues: 0
Type:project
Requires
- composer/installers: ~1.6
- cweagans/composer-patches: ~1.6
- drupal/core: 8.7.x-dev
Requires (Dev)
- drush/drush: ~9.5
- webflo/drupal-core-require-dev: ~8.7.0
This package is auto-updated.
Last update: 2024-10-22 16:35:48 UTC
README
Use this project as a template for working on Drupal core and contrib modules.
Requirements
Most of the dev tools are in the php Docker container, but you will need one or two out side of that.
This includes:
- PHP 7.1+
- Git
- and Composer.
If you don't have these installed, then follow the instructions for your specific platform.
MacOS
Download and install Homebrew follow the online instructions.
Add the php tap:
brew tap homebrew/homebrew-php brew install git composer php71 php71-mcrypt php71-xdebug
Windows
TBC
Installing
To create a new project in a directory called `myproject' run the following command.
composer create-project --no-install -s dev previousnext/drupal-project myproject
Docker
You will need to install Docker and related tools.
OS-specific Installation
MacOS
Download and install Docker for Mac
Windows
Download and install Docker for Windows
Download and install Make for Windows
Linux
You know what you're doing, right?
Docker Compose
Due to networking, and file system performance issues in Docker for Mac, you
need a slightly different docker-compose.yml file for MacOS. To simplify your
commands, we recommend creating an alias in ~/.bashrc
such as:
alias dc='docker-compose -f docker-compose.osx.yml'
To start the container, run:
dc up -d
Setup and Install Drupal
For simplicity, run all commands from within the php container. You can get shell access via:
dc exec app bash
To initialise your local dev environment run the following:
make install
Developer Options
To set up common developer options, run:
make devify
Install a contrib module
The easiest way to install a contrib module to work on is via composer.
For example, to work on pathauto, type the following:
composer require drupal/pathauto --prefer-source
Testing
To run tests, run:
make test