WebKings-ca / gocomposer

Converts Drupal 8 Sites to the latest Composer Managed Template
Other
14 stars 2 forks source link
composer demo drupal drupal8 plug update

GoComposer

GoComposer is an all in one solution to update existing Drupal 8 sites to the latest Fully Composer Managed template. It takes the template found in drupal-project and automagically applies it to ypur site.

Just add the GoComposer Plug-in to your project, invoke one command and let this Plug-in do the rest...

The aim of this Plug-in is to morph all drupal 8 installation into a universal defualt template.

Having your Drupal 8 installation modified to this template will simplify future Drupal 8 Core & Contrib Modules updates. It's highly recommended you switch to this template

Intended Audience

If you current Project is a Drupal 8 site with one of the following Scenarios, then GoComposer is your one stop solution:

  • Scenario 1: You have installed your site initially through Composer using the drupal/drupal deprecated package.

  • Scenario 2: You have installed your site initially from a tar.gz or zip file.

  • Scenario 3: You have installed your site using git clone from the Drupal.org main repo.

Pre-requisites

  • It's highly recommended to implement this update on your local environment then update your production site

  • You have to have access to the bash shell command line to run this Plug-in. On Mac just use Terminal. On Windows 10, it's recomended to install the Ubuntu Bash shell

  • You have to have Composer installed globally on your local environment, If you haven't already done so, follow the instructions here to download the executbale and here to add it to your path

Features

Running the gocomposer Command will automate the process of Updating your existing custom site to the latest and greatest Drupal 8 version.

The 'gocomposer' Command will do the following:

Installation

cd path/to/drupal/project/repo

composer require webkings-ca/gocomposer:dev-master

Usage:

cd path/to/drupal/project/repo

composer require webkings-ca/gocomposer:dev-master

composer gocomposer

Make sure you are in the Drupal root directory of your project, where .git is located.

Example:


# Drupal Root is located in a `~/Sites/Drupal8project` subdirectory.

cd ~/Sites/Drupal8project

composer require webkings-ca/gocomposer:dev-master

composer gocomposer

## Demo

_You can watch a demo for using this Plug-in [here](https://www.youtube.com/watch?v=13tLIoSKr0s&feature=youtu.be)_

[![Drupal 8 GoComposer Demo](https://img.youtube.com/vi/13tLIoSKr0s/0.jpg)](https://youtu.be/13tLIoSKr0s)

## Final Folder Structure

_After Running GoComposer your site structure will be:_

![Final Folder Structure](https://webkings.ca/sites/default/files/New%20Folder%20Structure.png)

## Troubleshooting

> If you are unable to require `webkings-ca/gocomposer` due to your current Configuration try the following:

```$xslt
# Drupal Root is located in a `~/Sites/Drupal8project` subdirectory.

cd ~/Sites/Drupal8project

rm -rf vendor

composer require webkings-ca/gocomposer:dev-master

composer gocomposer

Should you encounter any issues, Create an issue in the issue queue

Credits:

This project's code base template is taken from composerize-drupal plugin. It has been heavily modified to implement it's current functionality.

Enjoy!