WP Manifestindependent plugin directory
manifest / developer / preview-check-composer-vite

Playground Demo (Composer + Vite)

Disposable copy of the composer-vite Playground preview example

★ 0stars
8release downloads
ci-artifactslatest · never

Install

Download pr-1-658785746a5fa31ba2d7207eeb852db9196a9941-playground-demo-plugin.zip From the ci-artifacts release on GitHub, Sep 14, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/adamziel/preview-check-composer-vite/releases/download/ci-artifacts/pr-1-658785746a5fa31ba2d7207eeb852db9196a9941-playground-demo-plugin.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

preview-in-playground-button-v3-example-composer-vite

Realistic example for the WordPress Playground v3 reusable preview workflows: a plugin that needs both composer install (PSR-4 autoload + a runtime dep) and npm run build (Vite-bundled admin JS) before it can run.

Demonstrates that the v3 reusable workflows handle a multi-toolchain build with no per-step boilerplate — caller setup is still ~20 lines across two files.

What's in here

  • playground-demo-plugin.php — main plugin file. Loads vendor/autoload.php, calls into the namespaced PlaygroundDemo\Notice class.
  • src/Notice.php — autoloaded class, uses a real Composer dep (psr/log) to prove composer install ran.
  • composer.json — declares PSR-4 + a runtime require.
  • src-js/admin.js + vite.config.js + package.json — Vite source and config, output goes to dist/admin.js (no hash, fixed name) so PHP can enqueue it without reading a manifest.
  • .github/workflows/pr-preview-build.yml — runs composer install --no-dev, then npm install && npm run build, stages the result with rsync excludes, zips it.
  • .github/workflows/pr-preview-publish.yml — exposes the zip, posts the preview button.

The reusable workflows are pinned to the in-development branch adamziel/build-command-reusable-workflows of WordPress/action-wp-playground-pr-preview. Repin to @v3 once that lands.

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
ci-artifacts latest
Sep 14, 2026 1mo ago
pr-1-658785746a5fa31ba2d7207eeb852db9196a9941-playground-demo-plugin.zip +1 asset
8
pr-1-658785746a5fa31ba2d7207eeb852db9196a9941-playground-demo-plugin.zip6
pr-1-66141781db80de106e5cc9b063b517f94e79e48c-playground-demo-plugin.zip2