Update Drupal configuration files
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
7671099aea
commit
96ac446aa5
22 changed files with 309 additions and 14 deletions
5
drupal-nix-flake/.gitignore
vendored
5
drupal-nix-flake/.gitignore
vendored
|
@ -8,6 +8,7 @@
|
|||
/phpcs.xml
|
||||
/phpunit.xml
|
||||
/phpstan.neon
|
||||
/recipes/README.txt
|
||||
/vendor/
|
||||
|
||||
/web/.csslintrc
|
||||
|
@ -21,10 +22,10 @@
|
|||
/web/core/
|
||||
/web/example.gitignore
|
||||
/web/index.php
|
||||
/web/libraries/
|
||||
/web/modules/README.txt
|
||||
/web/modules/contrib/
|
||||
/web/profiles/README.txt
|
||||
/web/profiles/contrib/
|
||||
/web/profiles/
|
||||
/web/robots.txt
|
||||
/web/sites/*/files/
|
||||
/web/sites/*/private/
|
||||
|
|
11
drupal-nix-flake/clean
Executable file
11
drupal-nix-flake/clean
Executable 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-nix-flake/start
Executable file
5
drupal-nix-flake/start
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
nix run "$@"
|
29
drupal-nix-flake/tools/scripts/new-drupal-module
Executable file
29
drupal-nix-flake/tools/scripts/new-drupal-module
Executable 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."
|
Loading…
Add table
Add a link
Reference in a new issue