Skip to content

Commit b6587ee

Browse files
committed
3893: Added tasks for development setup
1 parent 542ba99 commit b6587ee

File tree

1 file changed

+45
-2
lines changed

1 file changed

+45
-2
lines changed

Taskfile.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ tasks:
232232
fixtures:load:
233233
prompt: "This will reset your content. Continue?"
234234
cmds:
235-
- task drush -- --yes pm:enable hoeringsportal_base_fixtures $(find web/modules/custom -type f -name 'hoeringsportal_*_fixtures.info.yml' -exec basename -s .info.yml {} \;)
235+
# - task drush -- --yes pm:enable hoeringsportal_base_fixtures $(find web/modules/custom -type f -name 'hoeringsportal_*_fixtures.info.yml' -exec basename -s .info.yml {} \;)
236236
- task drush -- --yes content-fixtures:load
237-
- task drush -- --yes pm:uninstall content_fixtures
237+
# - task drush -- --yes pm:uninstall content_fixtures
238238
# Update states on public meetings.
239239
- task drush -- --yes hoeringsportal:public_meeting:state-update
240240
- task drush -- --yes cache:rebuild
@@ -256,3 +256,46 @@ tasks:
256256
# https://www.drupal.org/project/drupal/issues/3496223
257257
- 'task compose -- exec phpfpm sed -i "s/Plural-Forms: nplurals=2; plural=(n > 1);/Plural-Forms: nplurals=2; plural=(n != 1);/" translations/custom-translations.da.po'
258258
silent: true
259+
260+
261+
# Development settings tasks (`/admin/config/development/settings`) (cf. https://www.drupal.org/docs/develop/development-tools/disabling-and-debugging-caching).
262+
263+
development-settings:do-not-cache-markup-enable:
264+
desc: Disable markup cache (check ‘Do not cache markup“ on `/admin/config/development/settings`)
265+
cmds:
266+
- task drush -- php:eval "Drupal::keyValue('development_settings')->setMultiple(['disable_rendered_output_cache_bins' => TRUE]);"
267+
- task drush -- cache:rebuild
268+
269+
development-settings:do-not-cache-markup-disable:
270+
desc: Enable markup cache (for production) (uncheck ‘Do not cache markup“ on `/admin/config/development/settings`)
271+
cmds:
272+
- task drush -- php:eval "Drupal::keyValue('development_settings')->setMultiple(['disable_rendered_output_cache_bins' => FALSE]);"
273+
- task drush -- cache:rebuild
274+
275+
development-settings:twig-develoment-mode-enable:
276+
desc: Enable Twig development mode (check ‘Twig development mode“ on `/admin/config/development/settings`)
277+
cmds:
278+
- task drush -- php:eval "Drupal::keyValue('development_settings')->setMultiple(['twig_debug' => TRUE, 'twig_cache_disable' => TRUE]);"
279+
- task drush -- cache:rebuild
280+
281+
development-settings:twig-develoment-mode-disable:
282+
desc: Disable Twig development mode (for production) (uncheck ‘Twig development mode“ on `/admin/config/development/settings`)
283+
cmds:
284+
- task drush -- php:eval "Drupal::keyValue('development_settings')->setMultiple(['twig_debug' => FALSE, 'twig_cache_disable' => FALSE]);"
285+
- task drush -- cache:rebuild
286+
287+
development-settings:development:
288+
desc: Set cache settings for development
289+
cmds:
290+
- task development-settings:do-not-cache-markup-enable
291+
- task development-settings:twig-develoment-mode-enable
292+
- task drush -- cache:rebuild
293+
silent: true
294+
295+
development-settings:production:
296+
desc: Set cache settings for production
297+
cmds:
298+
- task development-settings:do-not-cache-markup-disable
299+
- task development-settings:twig-develoment-mode-disable
300+
- task drush -- cache:rebuild
301+
silent: true

0 commit comments

Comments
 (0)