asuwebplatforms / webspark
ASU Webspark Drupal Profile
Package info
github.com/ASUWebPlatforms/webspark
Type:drupal-profile
pkg:composer/asuwebplatforms/webspark
Requires
- php: >=8.3.0
- asuwebplatforms/asu_governance: 1.2.1
- cweagans/composer-patches: 1.7.3
- drupal/acquia_purge: 1.5.0
- drupal/admin_toolbar: 3.6.1
- drupal/allowed_formats: 3.0.1
- drupal/anchor_link: 3.0.3
- drupal/block_field: 1.0.0-rc4
- drupal/captcha: 2.0.10
- drupal/cas: 2.3.2
- drupal/ckeditor: 1.0.2
- drupal/ckeditor_responsive_plugin: 2.1.0-beta1
- drupal/components: 3.2.0
- drupal/config_readonly: 1.0.0-beta5
- drupal/config_update: 2.0.0-alpha3
- drupal/core-composer-scaffold: 10.5.11
- drupal/core-recommended: 10.5.11
- drupal/crop: 2.3.0
- drupal/ctools: 4.1.0
- drupal/current_page_crumb: 1.5.0
- drupal/decorative_image_widget: 1.0.1
- drupal/devel: 5.4.0
- drupal/devel_kint_extras: 1.1.0
- drupal/editor_advanced_link: 2.3.4
- drupal/editoria11y: 2.2.18
- drupal/environment_indicator: 4.0.14
- drupal/field_group: 3.6.0
- drupal/field_menu: 2.2.0
- drupal/field_states_ui: 3.0.0
- drupal/fontawesome: 3.0.0
- drupal/image_widget_crop: 2.4.0
- drupal/imagemagick: 4.0.2
- drupal/layout_builder_component_attributes: 2.2.0
- drupal/layout_builder_restrictions: 2.19.0
- drupal/layout_builder_usage_reports: 1.0.2
- drupal/layout_section_classes: 1.5.0
- drupal/linkit: 7.0.15
- drupal/maxlength: 2.1.2
- drupal/media_library_form_element: 2.1.0
- drupal/metatag: 2.2.0
- drupal/paragraphs: 1.17.0
- drupal/pathauto: 1.13.0
- drupal/radix: 5.0.11
- drupal/redirect: 1.9.0
- drupal/robotstxt: 1.5.0
- drupal/schema_metatag: 3.0.1
- drupal/seckit: 2.0.3
- drupal/select2: 1.15.0
- drupal/simple_sitemap: 4.2.3
- drupal/smtp: 1.2.0
- drupal/webform: 6.2.3
- drush/drush: 12.5.3
- fontawesome/fontawesome: *
- northernco/ckeditor5-anchor-drupal: *
- npm-asset/fonticonpicker--fonticonpicker: 3.1.1
- npm-asset/select2: 4.1.0-RC.0
- oomphinc/composer-installers-extender: 2.0.1
- zaporylie/composer-drupal-optimizations: 1.2.0
README
Description
Webspark profile installs all the required modules and configurations for the webspark distribution.
How to install
- For an initial install, follow the instructions in the INSTALL-INSTRUCTIONS.md file.
Features
- Installs all the required modules for this distribution
- Comes with updates that will periodically improve the experience
- Has some predefined configurations on blocks, users, ckeditor profiles, system settings, etc.
Requirements
Drupal 10 or higher
Dependency sync process
The Webspark profile is installed into many downstream repositories via Composer.
A handful of files that Webspark relies on cannot live inside the profile itself —
they have to exist at the root of the consuming repository. To deliver these files without causing merge conflicts on
every upstream update, the profile ships them inside two source folders and
syncs/distributes them out to the repository root automatically when you run
composer install or composer update.
This section documents that process so developers understand what happens, why, and which files they should and should not edit.
The two source folders
Both folders live inside the profile and are the source of truth. They are
copied out to the repository root, where they are renamed (the -source suffix is
dropped):
| Profile source folder | Root destination | How it gets there |
|---|---|---|
webspark-dependencies-source/ |
webspark-dependencies/ |
Automatically rsynced on every composer install/update. |
custom-dependencies-source/ |
custom-dependencies/ |
Copied once by hand during install, then owned by the site. |
webspark-dependencies/is upstream-owned. It is overwritten on every Composer run, so do not edit anything in it at the individual site level — your changes will be lost. Upstream changes belong inwebspark-dependencies-source/.custom-dependencies/is site-owned. It holds your site-specificcomposer.jsonandpatches.custom.jsonfiles, and is registered as a Composerpathrepository (asu/custom-dependencies). Manage it withcomposer custom-require/composer custom-remove(seecustom-dependencies/README.md).
Composer hook wiring
The root composer.json scripts section wires the process into Composer's
lifecycle:
WebsparkCustomScripts\ComposerScripts::writeComposerPatchFile— mergeswebspark-dependencies/patches.webspark.json(upstream) andcustom-dependencies/patches.custom.json(site) into the rootcomposer.patches.json. That root file is generated; edit the source patch files instead.post-update-cmdruns aftercomposer updateandpost-install-cmdruns aftercomposer install. Both start by running thedocroot/profiles/contrib/webspark/sync-dependenciesscript (the actual file sync, described below), then perform a couple of follow-up steps:- After an update,
ComposerScripts::postUpdatemerges the ASUAwesome and Font Awesome icon lists for the renovation theme. After an install,ComposerScripts::buildFrontendcompiles the renovation theme's frontend assets (only in theasufactory1CI pipeline). - Both then recreate the SimpleSAMLphp symlinks so the library can locate its public files and configuration.
- After an update,
The two Composer script classes are autoloaded from
webspark-dependencies/scripts/ComposerScripts.php and
CustomComposerScripts.php via the root composer.json autoload.classmap.
What sync-dependencies does
docroot/profiles/contrib/webspark/sync-dependencies runs on every
composer install / composer update. It is local-only: it is skipped when
AH_SITE_ENVIRONMENT (Acquia Cloud) or CI is set, because those environments
already have the synced files committed to the repository.
When it runs locally it performs the following steps:
-
Rsync the source folder.
rsync -avq --deletecopieswebspark-dependencies-source/to the root-levelwebspark-dependencies/directory. The--deleteflag meanswebspark-dependencies/is a faithful mirror of the source — anything not in the source is removed. -
Rewrite PHP namespaces. In every synced
*.phpfile the namespaceSampleWebsparkCustomScriptsis rewritten toWebsparkCustomScripts(the namespace the rootcomposer.jsonautoloader expects). -
Distribute the synced files to their final homes. Files that were rsynced into
webspark-dependencies/scripts/are moved to where they actually need to live for the repository to work, and the source copy underwebspark-dependencies/scripts/is deleted after each move:Synced source file Final destination Behavior scripts/pre-commit.git/hooks/pre-commitInstalls the hook, or merges the asu_commit_checkfunction into an existing hook.scripts/post-commit.git/hooks/post-commitInstalls the hook, or merges the asu_post_commit_actionsfunction into an existing hook.scripts/.prettierignoreroot .prettierignoreCopied to the repository root. scripts/prettierrc.jsroot .prettierrc.jsCopied to the repository root. scripts/.root-gitignoreroot .gitignoreEnsures the /node_modulesand!/package.jsonrules exist (appends them if missing).scripts/package.jsonroot package.jsonCreates the root package.json, or merges theprettierdevDependency into an existing one. -
Align
drupal/core-dev.sync_core_devreads the installeddrupal/core-recommendedversion fromcomposer.lockand adds/updates a matchingdrupal/core-deventry in the rootcomposer.jsonrequire-dev.
The files that remain in webspark-dependencies/ after distribution are the ones
that are referenced in place: the Composer scripts (scripts/ComposerScripts.php,
scripts/CustomComposerScripts.php, scripts/pre-autoload-check) and
patches.webspark.json.
What developers should / should not edit
- Upstream maintainers: make changes in
webspark-dependencies-source/(andcustom-dependencies-source/). These are the sources of truth that ship with the profile. - Site developers:
- Do not edit
webspark-dependencies/— it is regenerated on every Composer run. - Do not hand-edit the root
composer.patches.json— it is generated by merging the two patch source files. - Do put site-specific dependencies and patches in
custom-dependencies/usingcomposer custom-require/composer custom-remove.
- Do not edit
Related documentation
INSTALL-INSTRUCTIONS.md— For first-time setup, including the one-time copy ofcustom-dependencies-source/to root-levelcustom-dependencies/and the required rootcomposer.jsonconfiguration.UPDATE-INSTRUCTIONS.md— How to update an existing Webspark site.custom-dependencies/README.md— For managing site-specific dependencies and patches.