https://github.com/previousnext/drupal-project
A template for Drupal 8 projects.
https://github.com/previousnext/drupal-project
drupal drupal8
Last synced: 11 months ago
JSON representation
A template for Drupal 8 projects.
- Host: GitHub
- URL: https://github.com/previousnext/drupal-project
- Owner: previousnext
- License: gpl-2.0
- Created: 2017-11-07T07:45:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-22T03:22:18.000Z (over 7 years ago)
- Last Synced: 2025-04-05T22:28:29.259Z (12 months ago)
- Topics: drupal, drupal8
- Language: PHP
- Homepage:
- Size: 76.2 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Drupal Project
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][5].
If you don't have these installed, then follow the instructions for your specific
platform.
### MacOS
Download and install Homebrew follow the [online instructions][4].
Add the php tap:
```bash
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.
```bash
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][1]
#### Windows
Download and install [Docker for Windows][2]
Download and install [Make for Windows][3]
#### 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:
```bash
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:
```bash
make install
```
## Developer Options
To set up common developer options, run:
```bash
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:
```bash
make test
```
[1]: https://www.docker.com/docker-mac
[2]: https://www.docker.com/docker-windows
[3]: http://gnuwin32.sourceforge.net/packages/make.htm
[4]: https://brew.sh/
[5]: https://getcomposer.org