Install A Drupal 8 Module With Composer

Just a heads-up of a proof-of-concept I did.

Here's a github repo for the page_example module from examples. I've added a composer.json file which requires symfony/console (arbitrarily), and composer/installer (to make it work):

I then made a entry for it:

Go to the root of your Drupal 8 installation in the terminal. Type this:

$ composer require mile23/page-example dev-master

Composer will do what it's supposed to do and put the module in modules/, and add console to vendor/.

This means you can use Composer to manage dependencies. Since that's what it's for. :-)