Sites running the Webspark build.
Local Development • Code Quality Tools • Composer Package Registry • Resources
See the following documentation on getting your local DDEV environment setup for Acquia:
https://docs.google.com/document/d/1R-wFpJnxUmQJ35bbFEhtoXF4YZXkHe6ZVVy8oBUn9kQ/edit?usp=sharing
To ensure that the code quality tools outlined below are installed, run the following:
ddev composer install
ddev yarnStatic Analysis:
- PHPStan - Static analysis tool
- PHPStan Drupal Extension - Drupal-specific rules for PHPStan
Code Style & Standards:
- PHP_CodeSniffer - Coding standards enforcement
- Drupal Coder - Drupal-specific coding standards for PHP_CodeSniffer
- PHPCBF - Auto-fix coding standards
JavaScript/TypeScript:
- ESLint - JS linting and fixing
CSS/SCSS:
- Stylelint - CSS/SCSS linting and fixing
- EditorConfig:
.editorconfig(copied from Drupal core) - PHPStan:
phpstan.neon - ESLint:
.eslintrc.json(extends Drupal core) - Stylelint:
.stylelintrc.json(extends Drupal core)
The following are configured to only scan core Webspark files.
ddev composer run phpstan # Static analysis
ddev composer run phpcs # Check PHP coding standards
ddev composer run phpcbf # Fix PHP coding standardsThe following are configured to only scan core Webspark files.
ddev yarn run eslint # Lint JavaScript
ddev yarn run eslint:fix # Fix JavaScript
ddev yarn run stylelint # Lint CSS
ddev yarn run stylelint:fix # Fix CSSThe following command will run all code quality tools together for Webspark files.
ddev ws:lint # Lint core Webspark against all toolsIndividual sites should use the following commands for linting their code.
ddev phpstan # PHP static analysis
ddev phpcs # PHP coding standards
ddev phpcbf # Fix PHP coding standards
ddev eslint # JavaScript linting
ddev stylelint # CSS lintingUse the --help flag to see available options for each command. For example:
ddev phpstan --help
This repo doubles as a static Composer repository
for some of the Webspark packages it contains. Selected subdirectories are
packaged as zip artifacts, stored as GitHub Release assets on this repo, and
advertised via a packages.json served from GitHub Pages — a simple,
Satis alternative custom-built for ASU
Webspark.
Browse the published packages at https://asuwebplatforms.github.io/webspark-composer-test.
Add the repository to your project's composer.json:
{
"repositories": [
{ "type": "composer", "url": "https://asuwebplatforms.github.io/webspark-composer-test/" }
]
}Then require packages as normal:
composer require asuwebplatforms/asu_brandNotes for consumers:
- The repository must remain public for unauthenticated
composer install. - Branch builds are published as the
dev-mainversion (composer require asuwebplatforms/asu_brand:dev-main). - Release builds are published under the tag's version
(
composer require asuwebplatforms/asu_brand:0.0.5).
The publishing pipeline, packaging scripts, and browse page live in the
composer-registry/ directory. See
composer-registry/README.md for how it works and the file layout.