Download the PHP package davidbarratt/drupal-structure without Composer
On this page you can find all versions of the php package davidbarratt/drupal-structure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download davidbarratt/drupal-structure
More information about davidbarratt/drupal-structure
Files in davidbarratt/drupal-structure
Package drupal-structure
Short Description Giving Drupal 6 & 7 a Directory Sturcture like Drupal 8 via Composer
License Apache-2.0
Homepage https://github.com/davidbarratt/drupal-structure
Informations about the package drupal-structure
Drupal Structure
Giving Drupal 6 & 7 a Directory Sturcture like Drupal 8 via Composer
This script does the following tasks when Composer install
and update
is run:
- Creates the folders
libraries
,modules
,themes
, andsites
in theroot
- Copies
core/sites/README.txt
andcore/sites/example.sites.php
tosites
- Copies
core/sites/default/default.settings.php
tosites/default/default.settings.php
- Removes each folder in
core/sites
that is present insites
- Creates a symbolic link for each site from
core/sites
tosites
- Copies
core/sites/all/modules/README.txt
tomodules/README.txt
- Copies
core/sites/all/themes/README.txt
tothemes/README.txt
- Create symbolic link from
core/sites/all/modules
tomodules
- Create symbolic link from
core/sites/all/themes
tothemes
- Create symbolic link from
core/sites/all/libraries
tolibraries
- Create
sites/sites.php
if the file doesn’t already exist - Create symbolic link from
core/sites/sites.php
tosites/sites.php
Installation
Require this library in your composer.json
file
Add the scripts
Configuration
By default, the script assumes that Drupal core is located in the core
directory and the resources (modules, themes, etc.) are located in the same directory as your composer.json
file.
However, if you’d like to customize this, you can simply add the parameters in the extra
. Here are the defaults (which are not necessary to add):
Usage
You can use this script by simply executing composer install
or composer update
. Composer will execute the script when the process is finished.
Example
Here is a more practical example of how you might use this script in a real composer.json
file. This setup assumes that the web root is core
. However, you could copy index.php
and .htaccess
and alter them to fit your needs.
For a more complicated example, please see: https://github.com/davidbarratt/drupal7/blob/master/composer.json