Welcome to the SPARXSTAR WordPress Plugin Starter documentation.
git clone https://github.com/Starisian-Technologies/sparxstar-gluon.git your-plugin-name
cd your-plugin-name
composer install
npm install
Update these files with your plugin information:
sparxstar-plugin-entry.php - Plugin header, namespace, constantspackage.json - Name, description, repositorycomposer.json - Name, description, namespacephpcs.xml.dist - Text domain, prefixnpm run build
# Watch for changes (if you set up watch scripts)
npm run watch
# Or manually build after changes
npm run build
┌─────────────────────────────────────────────────────────┐
│ Plugin Entry Point │
│ sparxstar-plugin-entry.php │
└─────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ PSR-4 Autoloader │
│ src/includes/Autoloader.php │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────┼─────────────┐
▼ ▼ ▼
┌──────┐ ┌─────────┐ ┌──────────┐
│ Core │ │ Helpers │ │Integration│
└──────┘ └─────────┘ └──────────┘
src/
├── core/ # Core plugin functionality
├── helpers/ # Helper classes and utilities
├── includes/ # Autoloader and includes
├── integrations/ # Third-party integrations
├── templates/ # Template files
├── js/ # JavaScript source files
└── css/ # CSS source files
assets/
├── js/ # Minified JavaScript (generated)
└── css/ # Minified CSS (generated)
tests/
├── phpunit/ # PHP unit tests
└── e2e/ # End-to-end tests
.github/workflows/ # CI/CD workflows
docs/ # Documentation
src/ directories# Lint everything
npm run lint
composer run lint:php
# Run tests
npm test
composer run test:php
# Build assets
npm run build
# Commit (husky will run pre-commit hooks)
git commit -m "feat: add new feature"
composer run test:php
Test files: tests/phpunit/*Test.php
npm test
Test files: src/js/__tests__/*.test.js
npm run test:e2e
Test files: tests/e2e/*.spec.js
src/js/**/*.jsassets/js/**/*.min.jssrc/css/**/*.cssassets/css/**/*.min.cssPush a version tag:
git tag -a v1.2.3 -m "Release 1.2.3"
git push origin v1.2.3
GitHub Actions will:
See BUILD.md for manual deployment steps.
Problem: Build fails with “command not found”
Solution: Run npm install to install dependencies
Problem: PHPStan errors after update
Solution: Regenerate baseline: ./vendor/bin/phpstan analyse --generate-baseline
Problem: Tests fail in CI but pass locally
Solution: Check PHP version compatibility (CI tests PHP 8.2, 8.3, 8.4)
See CONTRIBUTING.md for contribution guidelines.
First-time contributors should read FIRST_CONTRIBUTION.md.
This template is licensed under the MIT License. See LICENSE.md.
Projects built with this template can use any license.