Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ web/sites/simpletest
# Composer installs contrib recipes into 'recipes/', next to custom recipes,
# so recipes stay an allow list: un-ignore custom recipes explicitly.
recipes/*
#;< CONTENT_MODEL
!recipes/page
#;> CONTENT_MODEL

#;< AI_CODE_INSTRUCTIONS
# Ignore all Claude files by default. Custom files should be added explicitly.
Expand Down
2 changes: 1 addition & 1 deletion .vortex/docs/content/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ caches, and content files. Two sections stay as small allow lists because a deny
rule cannot express them:

- `recipes/` - Composer installs contributed recipes next to your custom ones,
so custom recipes are un-ignored explicitly (`!recipes/page`).
so each custom recipe is un-ignored explicitly.
- `.claude/` - only `.claude/settings.json` is tracked by default.

The other two ignore files apply the same deny-list model to different targets:
Expand Down
8 changes: 8 additions & 0 deletions .vortex/installer/src/Prompts/Handlers/CustomModules.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ public function process(): void {
File::remove($path);
}
}

// The 'page' content model is shared: the demo module attaches behaviour to
// the content type and the search tests index content of that type. It is
// only removed once neither of them remains.
if (!in_array(self::DEMO, $selected) && !in_array(self::SEARCH, $selected)) {
File::removeTokenAsync('CONTENT_MODEL');
File::remove($t . '/recipes/page');
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ if ! echo "${environment}" | grep -qxF -e local -e ci -e dev -e stage; then
exit 0
fi

# The demo site modules attach behaviour to the 'page' content type, so it
# must exist before those modules are installed and their deploy hooks run.
# Site modules attach behaviour to the 'page' content type, so it must exist
# before those modules are installed and their deploy hooks run.
task "Creating the content model."
# Guard against environments where the Drupal CLI is not available.
if [ -x ./vendor/bin/dr ]; then
./vendor/bin/dr recipe "$(pwd)/recipes/page" --no-interaction
pass "Created the content model."
else
note "Skipped creating the content model: Drupal CLI is not available."
fi
pass "Created the content model."

task "Setting site name."
drush php:eval "\Drupal::service('config.factory')->getEditable('system.site')->set('name', 'star wars')->save();"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -82,7 +82,6 @@
@@ -84,7 +84,6 @@
# Note that deployment hooks for already enabled modules have run in the
# parent "provision.sh" script.
task "Installing custom site modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -86,7 +86,6 @@
@@ -88,7 +88,6 @@

drush pm:install sw_search

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -84,8 +84,6 @@
@@ -86,8 +86,6 @@
task "Installing custom site modules."
drush pm:install sw_base

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@@ -32,7 +32,6 @@
# Composer installs contrib recipes into 'recipes/', next to custom recipes,
# so recipes stay an allow list: un-ignore custom recipes explicitly.
recipes/*
-!recipes/page

# Ignore all Claude files by default. Custom files should be added explicitly.
.claude/*
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
@@ -82,11 +82,7 @@
@@ -36,17 +36,6 @@
exit 0
fi

-# Site modules attach behaviour to the 'page' content type, so it must exist
-# before those modules are installed and their deploy hooks run.
-task "Creating the content model."
-# Guard against environments where the Drupal CLI is not available.
-if [ -x ./vendor/bin/dr ]; then
- ./vendor/bin/dr recipe "$(pwd)/recipes/page" --no-interaction
- pass "Created the content model."
-else
- note "Skipped creating the content model: Drupal CLI is not available."
-fi
-
task "Setting site name."
drush php:eval "\Drupal::service('config.factory')->getEditable('system.site')->set('name', 'star wars')->save();"
pass "Set site name."
@@ -84,11 +73,7 @@
# Note that deployment hooks for already enabled modules have run in the
# parent "provision.sh" script.
task "Installing custom site modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -73,10 +73,6 @@
@@ -75,10 +75,6 @@
drush config-set clamav.settings mode_daemon_tcpip.hostname clamav
pass "Installed and configured ClamAV."

Expand All @@ -9,7 +9,7 @@
# Enable custom site module and run its deployment hooks.
#
# Note that deployment hooks for already enabled modules have run in the
@@ -83,8 +79,6 @@
@@ -85,8 +81,6 @@
# parent "provision.sh" script.
task "Installing custom site modules."
drush pm:install sw_base
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -61,7 +61,7 @@
@@ -63,7 +63,7 @@
pass "Set up the administration navigation."

task "Installing contrib modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -60,10 +60,6 @@
@@ -62,10 +62,6 @@
fi
pass "Set up the administration navigation."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@@ -46,7 +46,7 @@
pass "Created the content model."
@@ -48,7 +48,7 @@
fi

task "Setting site name."
-drush php:eval "\Drupal::service('config.factory')->getEditable('system.site')->set('name', 'star wars')->save();"
+drush php:eval "\Drupal::service('config.factory')->getEditable('system.site')->set('name', 'New hope')->save();"
pass "Set site name."

# Use the core Navigation module as the administration interface and remove
@@ -82,11 +82,11 @@
@@ -84,11 +84,11 @@
# Note that deployment hooks for already enabled modules have run in the
# parent "provision.sh" script.
task "Installing custom site modules."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -64,10 +64,6 @@
@@ -66,10 +66,6 @@
drush pm:install coffee config_split config_update media environment_indicator navigation_extra_tools pathauto redirect reroute_email robotstxt shield stage_file_proxy xmlsitemap
pass "Installed contrib modules."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -68,11 +68,6 @@
@@ -70,11 +70,6 @@
drush pm:install redis || true
pass "Installed Redis module."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -68,11 +68,6 @@
@@ -70,11 +70,6 @@
drush pm:install redis || true
pass "Installed Redis module."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -64,10 +64,6 @@
@@ -66,10 +66,6 @@
drush pm:install coffee config_split config_update media environment_indicator navigation_extra_tools pathauto redirect reroute_email robotstxt shield stage_file_proxy xmlsitemap
pass "Installed contrib modules."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -73,10 +73,6 @@
@@ -75,10 +75,6 @@
drush config-set clamav.settings mode_daemon_tcpip.hostname clamav
pass "Installed and configured ClamAV."

Expand All @@ -9,7 +9,7 @@
# Enable custom site module and run its deployment hooks.
#
# Note that deployment hooks for already enabled modules have run in the
@@ -83,8 +79,6 @@
@@ -85,8 +81,6 @@
# parent "provision.sh" script.
task "Installing custom site modules."
drush pm:install sw_base
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -64,19 +64,6 @@
@@ -66,19 +66,6 @@
drush pm:install coffee config_split config_update media environment_indicator navigation_extra_tools pathauto redirect reroute_email robotstxt shield stage_file_proxy xmlsitemap
pass "Installed contrib modules."

Expand All @@ -18,7 +18,7 @@
# Enable custom site module and run its deployment hooks.
#
# Note that deployment hooks for already enabled modules have run in the
@@ -83,8 +70,6 @@
@@ -85,8 +72,6 @@
# parent "provision.sh" script.
task "Installing custom site modules."
drush pm:install sw_base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,26 @@ public static function dataProviderHandlerProcess(): \Iterator {
static::cw(function (AbstractHandlerProcessTestCase $test): void {
$test->assertSutNotContains('_demo');
$test->assertSutNotContains('counter_block');
$test->assertDirectoryExists(static::$sut . '/recipes/page');
}),
];
yield 'custom_modules_no_search' => [
static::cw(function ($test): void {
$test->prompts[CustomModules::id()] = [CustomModules::BASE, CustomModules::DEMO];
$test->prompts[AiCodeInstructions::id()] = TRUE;
}),
static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('_search')),
static::cw(function (AbstractHandlerProcessTestCase $test): void {
$test->assertSutNotContains('_search');
$test->assertDirectoryExists(static::$sut . '/recipes/page');
}),
];
yield 'custom_modules_none' => [
static::cw(fn($test): array => $test->prompts[CustomModules::id()] = []),
static::cw(function (AbstractHandlerProcessTestCase $test): void {
$test->assertSutNotContains('_base');
$test->assertSutNotContains('_demo');
$test->assertSutNotContains('_search');
$test->assertDirectoryDoesNotExist(static::$sut . '/recipes/page');
}),
];
yield 'custom_modules_search_without_solr' => [
Expand All @@ -54,7 +59,10 @@ public static function dataProviderHandlerProcess(): \Iterator {
$test->prompts[Services::id()] = [Services::CLAMAV, Services::REDIS];
$test->prompts[AiCodeInstructions::id()] = TRUE;
}),
static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('_search')),
static::cw(function (AbstractHandlerProcessTestCase $test): void {
$test->assertSutNotContains('_search');
$test->assertDirectoryExists(static::$sut . '/recipes/page');
}),
];
}

Expand Down
10 changes: 7 additions & 3 deletions scripts/provision-00-enable-demo-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,18 @@ if ! echo "${environment}" | grep -qxF -e local -e ci -e dev -e stage; then
exit 0
fi

# The demo site modules attach behaviour to the 'page' content type, so it
# must exist before those modules are installed and their deploy hooks run.
#;< CONTENT_MODEL
# Site modules attach behaviour to the 'page' content type, so it must exist
# before those modules are installed and their deploy hooks run.
task "Creating the content model."
# Guard against environments where the Drupal CLI is not available.
if [ -x ./vendor/bin/dr ]; then
./vendor/bin/dr recipe "$(pwd)/recipes/page" --no-interaction
pass "Created the content model."
else
note "Skipped creating the content model: Drupal CLI is not available."
fi
pass "Created the content model."
#;> CONTENT_MODEL

task "Setting site name."
drush php:eval "\Drupal::service('config.factory')->getEditable('system.site')->set('name', 'YOURSITE')->save();"
Expand Down