first commit

This commit is contained in:
2024-07-15 12:33:27 +02:00
commit ce50ae282b
22084 changed files with 2623791 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
name: ddev-drupal-contrib
repository: ddev/ddev-drupal-contrib
version: 1.0.0-rc18
install_date: "2024-06-20T20:54:56+02:00"
project_files:
- commands/web/eslint
- commands/web/expand-composer-json
- commands/web/nightwatch
- commands/web/phpcbf
- commands/web/phpcs
- commands/web/phpunit
- commands/web/poser
- commands/web/stylelint
- commands/web/symlink-project
- config.contrib.yaml
global_files: []
removal_actions: []

View File

@@ -0,0 +1,20 @@
#!/bin/bash
#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
## Description: Run eslint inside the web container
## Usage: eslint [flags] [args]
## Example: "ddev eslint"
## ExecRaw: true
if "$DDEV_DOCROOT/core/node_modules/.bin/eslint" --version >/dev/null ; then
# Configure prettier
test -e .prettierrc.json || ln -s $DDEV_DOCROOT/core/.prettierrc.json .
test -e .prettierignore || echo '*.yml' > .prettierignore
# Change directory to the project root folder
cd "$DDEV_DOCROOT/modules/custom/$DDEV_SITENAME" || exit
"$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/core/node_modules/.bin/eslint" --no-error-on-unmatched-pattern --ignore-pattern="*.es6.js" --resolve-plugins-relative-to=$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/core --ext=.js,.yml . "$@"
else
echo "eslint is not available. You may need to 'ddev yarn --cwd $DDEV_DOCROOT/core install'"
exit 1
fi

View File

@@ -0,0 +1,14 @@
#!/bin/bash
#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
## Description: Add Drupal core and other needed dependencies.
## Usage: expand-composer-json [flags] [PROJECT_NAME]
## Example: "ddev expand-composer-json ctools"
## ExecRaw: true
export _WEB_ROOT=$DDEV_DOCROOT
cd "$DDEV_COMPOSER_ROOT" || exit
curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/scripts/expand_composer_json.php
php expand_composer_json.php "$DDEV_SITENAME"
rm -f expand_composer_json.php

View File

@@ -0,0 +1,10 @@
#!/bin/bash
#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
## Description: Run nightwatch inside the web container
## Usage: nightwatch [flags] [args]
## Example: "ddev nightwatch"
## ExecRaw: true
yarn --cwd "$DDEV_DOCROOT/core" test:nightwatch "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/modules/custom/" "$@"

View File

@@ -0,0 +1,15 @@
#!/bin/bash
#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
## Description: Run phpcbf inside the web container
## Usage: phpcbf [flags] [args]
## Example: "ddev phpcbf" or "ddev phpcbf -n"
## ExecRaw: true
if ! command -v phpcbf >/dev/null; then
echo "phpcbf is not available. You may need to 'ddev composer install'"
exit 1
fi
test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/scripts/phpcs.xml.dist
phpcbf -s --report-full --report-summary --report-source web/modules/custom "$@"

View File

@@ -0,0 +1,15 @@
#!/bin/bash
#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
## Description: Run phpcs inside the web container
## Usage: phpcs [flags] [args]
## Example: "ddev phpcs" or "ddev phpcs -n"
## ExecRaw: true
if ! command -v phpcs >/dev/null; then
echo "phpcs is not available. You may need to 'ddev composer install'"
exit 1
fi
test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/assets/phpcs.xml.dist
phpcs -s --report-full --report-summary --report-source web/modules/custom --ignore=*/.ddev/* "$@"

View File

@@ -0,0 +1,22 @@
#!/bin/bash
#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
## Description: Run phpunit inside the web container
## Usage: phpunit [flags] [args]
## Example: "ddev phpunit" or "ddev phpunit --stop-on-failure"
## ExecRaw: true
if ! command -v phpunit >/dev/null; then
echo "phpunit is not available. You may need to 'ddev composer install'"
exit 1
fi
# CHECK for local config.
if [ -f "phpunit.xml" ]; then
# Defer to local config
phpunit "$@"
else
# Bootstrap Drupal tests and run all custom module tests.
phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" --bootstrap $PWD/$DDEV_DOCROOT/core/tests/bootstrap.php $DDEV_DOCROOT/modules/custom "$@"
fi

View File

@@ -0,0 +1,15 @@
#!/bin/bash
#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
## Description: Expand composer.json and run composer install.
## Usage: poser [flags] [args]
## Example: "ddev poser"
## ExecRaw: true
export COMPOSER=composer.contrib.json
.ddev/commands/web/expand-composer-json "$DDEV_PROJECT_NAME"
composer install
rm composer.contrib.json composer.contrib.lock
yarn --cwd $DDEV_DOCROOT/core install
touch $DDEV_DOCROOT/core/.env

View File

@@ -0,0 +1,15 @@
#!/bin/bash
#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
## Description: Run stylelint inside the web container
## Usage: stylelint [flags] [args]
## Example: "ddev stylelint"
## ExecRaw: true
if yarn --cwd "$DDEV_DOCROOT/core" stylelint --version >/dev/null ; then
yarn --color --cwd "$DDEV_DOCROOT/core" --config ./.stylelintrc.json stylelint ../modules/custom/**/*.css "$@"
else
echo "stylelint is not available. You may need to 'ddev yarn --cwd $DDEV_DOCROOT/core install'"
exit 1
fi

View File

@@ -0,0 +1,18 @@
#!/bin/bash
#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
## Description: Symlink all root files/dirs into web.modules/custom/[PROJECT_NAME]
## Usage: symlink-project [flags] [args]
## Example: "ddev symlink-project"
## ExecRaw: true
export _WEB_ROOT=$DDEV_DOCROOT
#todo use more dynamic ref.
cd "$DDEV_COMPOSER_ROOT" || exit
curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/scripts/symlink_project.php
# Symlink name using underscores.
# @see https://www.drupal.org/docs/develop/creating-modules/naming-and-placing-your-drupal-module
php symlink_project.php "${DDEV_SITENAME//-/_}"
rm -f symlink_project.php

View File

@@ -0,0 +1,17 @@
#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
web_environment:
# If desired, override to a different version of Drupal core in via the project's DDEV config
- DRUPAL_CORE=^10
- SIMPLETEST_DB=mysql://db:db@db/db
- SIMPLETEST_BASE_URL=http://web
- BROWSERTEST_OUTPUT_DIRECTORY=/tmp
- BROWSERTEST_OUTPUT_BASE_URL=${DDEV_PRIMARY_URL}
hooks:
post-start:
- exec-host: |
if [[ -f vendor/autoload.php ]]; then
ddev symlink-project
else
exit 0
fi

View File

@@ -0,0 +1,18 @@
name: devel
type: drupal10
docroot: web
php_version: "8.1"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: [ ]
additional_fqdns: [ ]
database:
type: mariadb
version: "10.11"
use_dns_when_possible: true
composer_version: "2"
web_environment:
- SIMPLETEST_DB=mysql://root:root@ddev-devel-db/db
- SIMPLETEST_BASE_URL=http://ddev-devel-web