Acorn Example Package now includes a configure script for placeholder replacement

The acorn-example-package repo now includes a configure.php script that replaces all the placeholder names (vendor, package, namespace, class names, etc.) after you create a new package from the template.

Usage

After creating your repo from the template and cloning it, just run:

php configure.php

It’ll prompt you for your vendor name, package slug, namespace, class name, and other details — then update all the files and rename them accordingly.

You can also run it non-interactively for automation/CI:

php configure.php --no-interaction \
  --author-name="Your Name" \
  --author-email="[email protected]" \
  --vendor-slug="your-vendor" \
  --vendor-namespace="YourVendor" \
  --package-slug="your-package" \
  --class-name="YourPackage" \
  --package-description="Your package description"

And preview what it’ll do without writing anything with --dry-run:

php configure.php --dry-run

Links

2 Likes