Skip to content
Snippets Groups Projects
README.md 1.63 KiB
Newer Older
jurgenhaas's avatar
jurgenhaas committed
# Usage

## Preparation

- [Install composer](https://getcomposer.org): `sudo wget https://getcomposer.org/composer.phar --output-document=/usr/local/bin/composer && sudo chmod +x /usr/local/bin/composer`
- Disable XDebug for CLI - optional: `sudo phpdismod -s cli xdebug`
- [Install Prestissimo](https://github.com/hirak/prestissimo) - optional: `sudo composer global require "hirak/prestissimo:^0.3"`

jurgenhaas's avatar
jurgenhaas committed
## Create new project for local development

jurgenhaas's avatar
jurgenhaas committed
```
jurgenhaas's avatar
jurgenhaas committed
composer create-project lakedrops/d8-project [DIRNAME] --stability dev --no-interaction
jurgenhaas's avatar
jurgenhaas committed
```
jurgenhaas's avatar
jurgenhaas committed
This will build the full structure and create a git repository which you can then use during the full live-cycle of that project.

jurgenhaas's avatar
jurgenhaas committed
To install a new site with the included default configuration, use `drush site-install config_installer` and you get a jump-start from that.

jurgenhaas's avatar
jurgenhaas committed
## Deploy project to upstream stages

jurgenhaas's avatar
jurgenhaas committed
For deployment, both initially and for later updates, follow this:
jurgenhaas's avatar
jurgenhaas committed

```
mkdir /PATH/TO/ROOT
cd /PATH/TO/ROOT
git clone YOUR-GIT-REPOSITORY .
composer install
```

Optionally you can also create all the scaffolds by using

```
composer drupal-scaffold
```

jurgenhaas's avatar
jurgenhaas committed
To manually update the theme components, if you're using the `lakedrops/theme-d8-sass` package and unintentionally changed one of the core file, then you can always run
jurgenhaas's avatar
jurgenhaas committed
composer drupal-theme-update
jurgenhaas's avatar
jurgenhaas committed
```

## Adding new and updating existing components

Edit the composer.json file accoring to your requirements and then run `composer update`.

# Links

[Using Composer to install Drupal packages through Drupal.org](https://www.drupal.org/node/2718229)

# Credit

[Composer template for Drupal projects](https://github.com/drupal-composer/drupal-project)