Skip to content

Instantly share code, notes, and snippets.

@jmolivas
Created February 2, 2016 16:12
Show Gist options
  • Save jmolivas/318b3d251f71510dd213 to your computer and use it in GitHub Desktop.
Save jmolivas/318b3d251f71510dd213 to your computer and use it in GitHub Desktop.
DrupalComposer + post-install
{
"name": "drupal-composer/drupal-project",
"description": "Project template for Drupal 8 projects with composer",
"type": "project",
"license": "GPL-2.0+",
"authors": [
{
"name": "",
"role": ""
}
],
"repositories": [
{
"type": "composer",
"url": "https://packagist.drupal-composer.org"
},
{
"type": "package",
"package": {
"name": "drupal/pathauto",
"version": "dev-master",
"type": "drupal-module",
"source": {
"url": "https://github.com/md-systems/pathauto.git",
"type": "git",
"reference": "e5a14769e1f8340b6f0e1e3384c6c8120ea5c79d"
}
}
},
{
"type": "package",
"package": {
"name": "drupal/gist_embed",
"version": "dev-master",
"type": "drupal-module",
"source": {
"url": "https://github.com/jmolivas/gist_embed.git",
"type": "git",
"reference": "8c69c0ed119194831468e18738e45c6c6a2edbd9"
}
}
},
{
"type": "package",
"package": {
"name": "drupal/casper",
"version": "dev-master",
"type": "drupal-theme",
"source": {
"url": "https://git.drupal.org/project/casper.git",
"type": "git",
"reference": "8.x-1.x"
}
}
}
],
"require": {
"composer/installers": "^1.0.20",
"cweagans/composer-patches": "~1.0",
"drupal/core": "8.0.*",
"drush/drush": "~8.0",
"drupal/console": "~0.10",
"hirak/prestissimo": "~0.1",
"drupal/big_pipe": "~8.1",
"drupal/admin_toolbar": "~8.1",
"drupal/ctools": "~8.1",
"drupal/token": "8.x-1.x-dev",
"drupal/disqus": "~8.1",
"drupal/metatag": "~8.1",
"drupal/pathauto": "dev-master",
"drupal/gist_embed": "dev-master",
"drupal/casper": "dev-master"
},
"require-dev": {
"behat/mink": "~1.6",
"behat/mink-goutte-driver": "~1.2",
"jcalderonzumba/gastonjs": "^1.1@dev",
"jcalderonzumba/mink-phantomjs-driver": "dev-master#10d7c48c9a4129463052321b52450d98983c4332",
"mikey179/vfsStream": "~1.2",
"phpunit/phpunit": "~4.8",
"symfony/css-selector": "2.7.*"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-install-cmd": [
"sh ./scripts/composer/post-install.sh",
"vendor/bin/drupal chain --root=web --file=../scripts/composer/post-install.yml"
]
},
"extra": {
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/contrib/{$name}": ["type:drupal-drush"]
}
}
}
commands:
# Install Drupal
- command: site:install
options:
langcode: en
db-type: mysql
db-host: 127.0.0.1
db-name: drupal_composer
db-user: root
db-pass: root # local config
db-port: 3306
site-name: 'Drupal 8 site'
site-mail: admin@example.org # default email
account-name: admin # default account
account-mail: admin@example.org # default email
account-pass: admin # default pass
arguments:
profile: standard
- command: cache:rebuild
arguments:
cache: all
# Install modules
- command: module:install
arguments:
module:
- admin_toolbar
- admin_toolbar_tools
- disqus
- big_pipe
- token
- ctools
- pathauto
- gist_embed
# Restore Database
# - command: database:restore
# options:
# file: ../drupal_composer.sql
# Import configuration
# - command: config:import
#Create dummy data
- command: create:users
- command: create:vocabularies
- command: create:terms
- command: create:nodes
# Rebuild cahes
# - command: cache:rebuild
# arguments:
# cache: all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment