Skip to content

Commit

Permalink
Fix url to phpcs.xml.dist, ignore .ddev dir, support 'drupal' project…
Browse files Browse the repository at this point in the history
… type (#51)

* Fix url to phpcs.xml.dist

* Support drupal project type
  • Loading branch information
weitzman authored May 22, 2024
1 parent a758ddb commit f6986ab
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion commands/web/eslint
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Description: Run eslint inside the web container
## Usage: eslint [flags] [args]
## Example: "ddev eslint"
## ProjectTypes: drupal8,drupal9,drupal10
## ProjectTypes: drupal,drupal8,drupal9,drupal10
## ExecRaw: true

if "$DDEV_DOCROOT/core/node_modules/.bin/eslint" --version >/dev/null ; then
Expand Down
2 changes: 1 addition & 1 deletion commands/web/nightwatch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Description: Run nightwatch inside the web container
## Usage: nightwatch [flags] [args]
## Example: "ddev nightwatch"
## ProjectTypes: drupal8,drupal9,drupal10
## ProjectTypes: drupal,drupal8,drupal9,drupal10
## ExecRaw: true

yarn --cwd "$DDEV_DOCROOT/core" test:nightwatch "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/modules/custom/" "$@"
2 changes: 1 addition & 1 deletion commands/web/phpcbf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Description: Run phpcbf inside the web container
## Usage: phpcbf [flags] [args]
## Example: "ddev phpcbf" or "ddev phpcbf -n"
## ProjectTypes: drupal8,drupal9,drupal10
## ProjectTypes: drupal,drupal8,drupal9,drupal10
## ExecRaw: true

if ! command -v phpcbf >/dev/null; then
Expand Down
6 changes: 3 additions & 3 deletions commands/web/phpcs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
## Description: Run phpcs inside the web container
## Usage: phpcs [flags] [args]
## Example: "ddev phpcs" or "ddev phpcs -n"
## ProjectTypes: drupal8,drupal9,drupal10
## ProjectTypes: drupal,drupal8,drupal9,drupal10
## 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/scripts/phpcs.xml.dist
phpcs -s --report-full --report-summary --report-source web/modules/custom "$@"
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/* "$@"
2 changes: 1 addition & 1 deletion commands/web/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Description: Run phpunit inside the web container
## Usage: phpunit [flags] [args]
## Example: "ddev phpunit" or "ddev phpunit --stop-on-failure"
## ProjectTypes: drupal8,drupal9,drupal10
## ProjectTypes: drupal,drupal8,drupal9,drupal10
## ExecRaw: true

if ! command -v phpunit >/dev/null; then
Expand Down
4 changes: 2 additions & 2 deletions commands/web/poser
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
## Description: Expand composer.json and run composer install.
## Usage: poser [flags] [args]
## Example: "ddev poser"
## ProjectTypes: drupal8,drupal9,drupal10
## ProjectTypes: drupal,drupal8,drupal9,drupal10
## 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
touch $DDEV_DOCROOT/core/.env
2 changes: 1 addition & 1 deletion commands/web/stylelint
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Description: Run stylelint inside the web container
## Usage: stylelint [flags] [args]
## Example: "ddev stylelint"
## ProjectTypes: drupal8,drupal9,drupal10
## ProjectTypes: drupal,drupal8,drupal9,drupal10
## ExecRaw: true

if yarn --cwd "$DDEV_DOCROOT/core" stylelint --version >/dev/null ; then
Expand Down
2 changes: 1 addition & 1 deletion commands/web/symlink-project
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Description: Symlink all root files/dirs into web.modules/custom/[PROJECT_NAME]
## Usage: symlink-project [flags] [args]
## Example: "ddev symlink-project"
## ProjectTypes: drupal8,drupal9,drupal10
## ProjectTypes: drupal,drupal8,drupal9,drupal10
## ExecRaw: true

export _WEB_ROOT=$DDEV_DOCROOT
Expand Down

0 comments on commit f6986ab

Please sign in to comment.