Move the opdavies theme, add symlink
As per https://github.com/drupal-tome/tome-project. > When composer install or update is ran, the "modules" and "themes" directories, as well as the "settings.php" file, is symlinked into the "web" directory.
This commit is contained in:
parent
8c61efd39f
commit
c722387743
16 changed files with 32 additions and 16 deletions
22
.gitignore
vendored
22
.gitignore
vendored
|
@ -1,16 +1,6 @@
|
||||||
html/
|
/.editorconfig
|
||||||
vendor/
|
/.gitattributes
|
||||||
|
/drush
|
||||||
!content/
|
/html
|
||||||
|
/vendor/
|
||||||
web/*
|
/web
|
||||||
!web/assets/
|
|
||||||
web/assets/*
|
|
||||||
!web/assets/images/
|
|
||||||
!web/themes/
|
|
||||||
web/themes/*
|
|
||||||
!web/themes/custom/
|
|
||||||
web/themes/custom/*
|
|
||||||
!web/themes/custom/opdavies/
|
|
||||||
|
|
||||||
recipes/*/content
|
|
||||||
|
|
|
@ -106,6 +106,13 @@
|
||||||
"export": "drush tome:export --yes",
|
"export": "drush tome:export --yes",
|
||||||
"import": "drush tome:import",
|
"import": "drush tome:import",
|
||||||
"generate": "drush tome:static --uri https://www.oliverdavies.uk",
|
"generate": "drush tome:static --uri https://www.oliverdavies.uk",
|
||||||
|
"post-install-cmd": [
|
||||||
|
"@symlink"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"@symlink"
|
||||||
|
],
|
||||||
|
"symlink": "./tools/scripts/symlink.sh",
|
||||||
"test": [
|
"test": [
|
||||||
"composer validate --strict"
|
"composer validate --strict"
|
||||||
]
|
]
|
||||||
|
|
19
tools/scripts/symlink.sh
Executable file
19
tools/scripts/symlink.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
if [ ! -L web/sites/default/settings.php ] && [ ! -e web/sites/default/settings.php ]; then
|
||||||
|
ln -s ../../../settings.php web/sites/default/settings.php
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p web/{modules,themes}
|
||||||
|
|
||||||
|
if [ ! -L web/themes/custom ] && [ ! -e web/themes/custom ]; then
|
||||||
|
ln -s ../../themes web/themes/custom
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -L web/modules/custom ] && [ ! -e web/modules/custom ]; then
|
||||||
|
ln -s ../../modules web/modules/custom
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue