Skip to content

Instantly share code, notes, and snippets.

@rocketeerbkw
Created June 23, 2016 14:12
Show Gist options
  • Save rocketeerbkw/475f25fc8b6481b266ae4e3ef984e855 to your computer and use it in GitHub Desktop.
Save rocketeerbkw/475f25fc8b6481b266ae4e3ef984e855 to your computer and use it in GitHub Desktop.
Example composer.json for to use composer to install modules for Drupal 8
{
"name": "drupal/drupal",
"description": "Drupal is an open source content management platform powering millions of websites and applications.",
"type": "project",
"license": "GPL-2.0+",
"require": {
"composer/installers": "^1.0.21",
"wikimedia/composer-merge-plugin": "~1.3",
"drupal/geofield": "1.0.0-alpha2",
"drupal/address": "1.0.0-beta3"
},
"replace": {
"drupal/core": "~8.1"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"preferred-install": "dist",
"autoloader-suffix": "Drupal8"
},
"extra": {
"_readme": [
"By default Drupal loads the autoloader from ./vendor/autoload.php.",
"To change the autoloader you can edit ./autoload.php."
],
"merge-plugin": {
"include": [
"core/composer.json"
],
"recurse": false,
"replace": false,
"merge-extra": false
},
"installer-paths": {
"modules/contrib/{$name}/": ["type:drupal-module"],
"themes/{$name}/": ["drupal/zen"]
}
},
"autoload": {
"psr-4": {
"Drupal\\Core\\Composer\\": "core/lib/Drupal/Core/Composer"
}
},
"scripts": {
"pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump",
"post-autoload-dump": "Drupal\\Core\\Composer\\Composer::ensureHtaccess",
"post-package-install": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
"post-package-update": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup"
},
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment