Update Drupal configuration files

Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-10-08 22:00:52 +01:00
parent 7671099aea
commit 96ac446aa5
22 changed files with 309 additions and 14 deletions

44
drupal-cms/.gitignore vendored Normal file
View file

@ -0,0 +1,44 @@
/.direnv/
/.editorconfig
/.env
/.gitattributes
/.phpunit.result.cache
/bin/
/data/
/phpcs.xml
/phpunit.xml
/phpstan.neon
/recipes/README.txt
/vendor/
/web/.csslintrc
/web/.eslintignore
/web/.eslintrc.json
/web/.ht.router.php
/web/.htaccess
/web/INSTALL.txt
/web/README.md
/web/autoload.php
/web/core/
/web/example.gitignore
/web/index.php
/web/libraries/
/web/modules/README.txt
/web/modules/contrib/
/web/profiles/
/web/robots.txt
/web/sites/*/files/
/web/sites/*/private/
/web/sites/*/services*.yml
/web/sites/*/settings*.php
/web/sites/README.txt
/web/sites/default/default.services.yml
/web/sites/default/default.settings.php
/web/sites/development.services.yml
/web/sites/example.settings.local.php
/web/sites/example.sites.php
/web/sites/simpletest/
/web/themes/README.txt
/web/themes/contrib/
/web/update.php
/web/web.config

8
drupal-cms/.tmux-sessionizer Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
tmux new-window -dn scratch
tmux new-window -dn server
tmux send-keys -t server "nix run" Enter
nvim .

8
drupal-cms/build Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
composer install
composer recipe:unpack
php -S localhost:8888 -t web

View file

@ -0,0 +1,6 @@
---
name: drupal-cms
template: php-drupal
parameters:
database:
name: drupal_cms

11
drupal-cms/clean Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
rm -rf \
web/core \
web/modules/contrib \
web/profiles/contrib \
web/themes/contrib \
bin \
vendor

5
drupal-cms/start Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
nix run "$@"

View file

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
NAME="$1"
DIR="web/modules/custom/$NAME"
test -d "$DIR" && echo "Module $NAME already exists." && exit 1
DIRS=(
"$DIR/src"
"$DIR/tests/src"
)
FILES=(
"$DIR/$NAME.info.yml"
"$DIR/$NAME.routing.yml"
"$DIR/$NAME.services.yml"
"$DIR/README.md"
)
mkdir -p "${DIRS[@]}"
touch "${FILES[@]}"
echo "# $NAME" > "$DIR/README.md"
echo "Created $DIR."