Skip to content

Commit

Permalink
Merge branch 'main' into tests-rehaul
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman authored Oct 10, 2024
2 parents 180ae7e + 241e70e commit f90609e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion commands/web/eslint
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if "$DDEV_DOCROOT/core/node_modules/.bin/eslint" --version >/dev/null ; then
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
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 exec \"cd $DDEV_DOCROOT/core && yarn install\"'"
Expand Down
7 changes: 7 additions & 0 deletions commands/web/expand-composer-json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@
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
if [[ ! -f composer.json ]]; then
echo "{}" > composer.json
_ddev_drupal_contrib_empty_composer=true
fi
php expand_composer_json.php "$DDEV_SITENAME"
rm -f expand_composer_json.php
if [ "$_ddev_drupal_contrib_empty_composer" = true ]; then
rm -f composer.json
fi

0 comments on commit f90609e

Please sign in to comment.