Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stack 1: Webspark

Sites running the Webspark build.

Local DevelopmentCode Quality ToolsComposer Package RegistryResources



Local Development

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 yarn


Code Quality Tools

PHP

Static 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

Frontend Tools

JavaScript/TypeScript:

  • ESLint - JS linting and fixing

CSS/SCSS:

  • Stylelint - CSS/SCSS linting and fixing

Configuration Files

  • EditorConfig: .editorconfig (copied from Drupal core)
  • PHPStan: phpstan.neon
  • ESLint: .eslintrc.json (extends Drupal core)
  • Stylelint: .stylelintrc.json (extends Drupal core)

Available Commands

Composer Commands

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 standards

NPM Commands

The 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 CSS

DDEV Commands

The following command will run all code quality tools together for Webspark files.

ddev ws:lint                # Lint core Webspark against all tools

Individual 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 linting

Use the --help flag to see available options for each command. For example:

ddev phpstan --help



Composer Package Registry

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.

Consuming the packages

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_brand

Notes for consumers:

  • The repository must remain public for unauthenticated composer install.
  • Branch builds are published as the dev-main version (composer require asuwebplatforms/asu_brand:dev-main).
  • Release builds are published under the tag's version (composer require asuwebplatforms/asu_brand:0.0.5).

Maintaining the registry

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.

Resources



About

A test for a new package distribution system

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages