File tree Expand file tree Collapse file tree 8 files changed +15
-8
lines changed Expand file tree Collapse file tree 8 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 7
7
# # Example: "ddev eslint"
8
8
# # ExecRaw: true
9
9
10
+ DRUPAL_PROJECTS_PATH=${DRUPAL_PROJECTS_PATH:- modules/ custom}
10
11
if " $DDEV_DOCROOT /core/node_modules/.bin/eslint" --version > /dev/null ; then
11
12
# Configure prettier
12
13
test -e .prettierrc.json || ln -s $DDEV_DOCROOT /core/.prettierrc.json .
13
14
test -e .prettierignore || echo ' *.yml' > .prettierignore
14
15
# Change directory to the project root folder
15
- cd " $DDEV_DOCROOT /modules/custom /${DDEV_SITENAME// -/ _} " || exit
16
+ cd " $DDEV_DOCROOT /$DRUPAL_PROJECTS_PATH /${DDEV_SITENAME// -/ _} " || exit
16
17
" $DDEV_COMPOSER_ROOT /$DDEV_DOCROOT /core/node_modules/.bin/eslint" --config=" ../../../core/.eslintrc.passing.json" --no-error-on-unmatched-pattern --ignore-pattern=" *.es6.js" --resolve-plugins-relative-to=$DDEV_COMPOSER_ROOT /$DDEV_DOCROOT /core --ext=.js,.yml . " $@ "
17
18
else
18
19
echo " eslint is not available. You may need to 'ddev exec \" cd $DDEV_DOCROOT /core && yarn install\" '"
Original file line number Diff line number Diff line change 7
7
# # Example: "ddev nightwatch"
8
8
# # ExecRaw: true
9
9
10
- yarn --cwd " $DDEV_DOCROOT /core" test:nightwatch " $DDEV_COMPOSER_ROOT /$DDEV_DOCROOT /modules/custom/" " $@ "
10
+ DRUPAL_PROJECTS_PATH=${DRUPAL_PROJECTS_PATH:- modules/ custom}
11
+ yarn --cwd " $DDEV_DOCROOT /core" test:nightwatch " $DDEV_COMPOSER_ROOT /$DDEV_DOCROOT /$DRUPAL_PROJECTS_PATH /" " $@ "
Original file line number Diff line number Diff line change 7
7
# # Example: "ddev phpcbf" or "ddev phpcbf -n"
8
8
# # ExecRaw: true
9
9
10
+ DRUPAL_PROJECTS_PATH=${DRUPAL_PROJECTS_PATH:- modules/ custom}
10
11
if ! command -v phpcbf > /dev/null; then
11
12
echo " phpcbf is not available. You may need to 'ddev composer install'"
12
13
exit 1
13
14
fi
14
15
test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/assets/phpcs.xml.dist
15
- phpcbf -s --report-full --report-summary --report-source $DDEV_DOCROOT /modules/custom " $@ "
16
+ phpcbf -s --report-full --report-summary --report-source $DDEV_DOCROOT /$DRUPAL_PROJECTS_PATH " $@ "
Original file line number Diff line number Diff line change 7
7
# # Example: "ddev phpcs" or "ddev phpcs -n"
8
8
# # ExecRaw: true
9
9
10
+ DRUPAL_PROJECTS_PATH=${DRUPAL_PROJECTS_PATH:- modules/ custom}
10
11
if ! command -v phpcs > /dev/null; then
11
12
echo " phpcs is not available. You may need to 'ddev composer install'"
12
13
exit 1
13
14
fi
14
15
test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/assets/phpcs.xml.dist
15
- phpcs -s --report-full --report-summary --report-source $DDEV_DOCROOT /modules/custom --ignore=* /.ddev/* " $@ "
16
+ phpcs -s --report-full --report-summary --report-source $DDEV_DOCROOT /$DRUPAL_PROJECTS_PATH --ignore=* /.ddev/* " $@ "
Original file line number Diff line number Diff line change 7
7
# # Example: "ddev phpstan" or "ddev phpstan -n"
8
8
# # ExecRaw: true
9
9
10
+ DRUPAL_PROJECTS_PATH=${DRUPAL_PROJECTS_PATH:- modules/ custom}
10
11
if ! command -v phpstan > /dev/null; then
11
12
echo " phpstan is not available. You may need to 'ddev poser'"
12
13
exit 1
@@ -16,4 +17,4 @@ test -e phpstan.neon || curl -OL https://git.drupalcode.org/project/gitlab_templ
16
17
sed -i ' s/BASELINE_PLACEHOLDER/phpstan-baseline.neon/g' phpstan.neon
17
18
# Add an empty baseline file to ensure it exists.
18
19
test -e phpstan-baseline.neon || touch phpstan-baseline.neon
19
- phpstan analyse $DDEV_DOCROOT /modules/custom " $@ "
20
+ phpstan analyse $DDEV_DOCROOT /$DRUPAL_PROJECTS_PATH " $@ "
Original file line number Diff line number Diff line change 7
7
# # Example: "ddev phpunit" or "ddev phpunit --stop-on-failure"
8
8
# # ExecRaw: true
9
9
10
+ DRUPAL_PROJECTS_PATH=${DRUPAL_PROJECTS_PATH:- modules/ custom}
10
11
if ! command -v phpunit > /dev/null; then
11
12
echo " phpunit is not available. You may need to 'ddev composer install'"
12
13
exit 1
@@ -18,5 +19,5 @@ if [ -f "phpunit.xml" ]; then
18
19
phpunit " $@ "
19
20
else
20
21
# Bootstrap Drupal tests and run all custom module tests.
21
- phpunit --bootstrap $PWD /$DDEV_DOCROOT /core/tests/bootstrap.php $DDEV_DOCROOT /modules/custom " $@ "
22
+ phpunit --bootstrap $PWD /$DDEV_DOCROOT /core/tests/bootstrap.php $DDEV_DOCROOT /$DRUPAL_PROJECTS_PATH " $@ "
22
23
fi
Original file line number Diff line number Diff line change 7
7
# # Example: "ddev stylelint"
8
8
# # ExecRaw: true
9
9
10
+ DRUPAL_PROJECTS_PATH=${DRUPAL_PROJECTS_PATH:- modules/ custom}
10
11
if $DDEV_DOCROOT /core/node_modules/.bin/stylelint --version > /dev/null ; then
11
12
# Change directory to the project root folder
12
- cd " $DDEV_DOCROOT /modules/custom /${DDEV_SITENAME// -/ _} " || exit
13
+ cd " $DDEV_DOCROOT /$DRUPAL_PROJECTS_PATH /${DDEV_SITENAME// -/ _} " || exit
13
14
" $DDEV_COMPOSER_ROOT /$DDEV_DOCROOT /core/node_modules/.bin/stylelint" --color --config " $DDEV_COMPOSER_ROOT /$DDEV_DOCROOT /core/.stylelintrc.json" " ./**/*.css" " $@ "
14
15
else
15
16
echo " stylelint is not available. You may need to 'ddev exec \" cd $DDEV_DOCROOT /core && yarn install\" '"
Original file line number Diff line number Diff line change 2
2
3
3
# ddev-generated
4
4
# # Command provided by https://github.com/ddev/ddev-drupal-contrib
5
- # # Description: Symlink all root files/dirs into web. modules/custom/[PROJECT_NAME]
5
+ # # Description: Symlink all root files/dirs into web/ modules/custom/[PROJECT_NAME]
6
6
# # Usage: symlink-project [flags] [args]
7
7
# # Example: "ddev symlink-project"
8
8
# # ExecRaw: true
You can’t perform that action at this time.
0 commit comments