Skip to content

Commit 8be7f74

Browse files
retlehsclaude
andauthored
Update package development docs with configure script (#565)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7c061d5 commit 8be7f74

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

acorn/package-development.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
date_modified: 2025-10-06 17:00
2+
date_modified: 2026-03-05 12:00
33
date_published: 2021-10-21 13:21
44
title: Developing Packages for Acorn
55
description: Use the Acorn Example Package as a template for creating custom packages and reusable functionality for WordPress with Laravel architecture.
@@ -24,6 +24,24 @@ We recommend referencing the [Laravel docs on Packages](https://laravel.com/docs
2424

2525
From the [roots/acorn-example-package](https://github.com/roots/acorn-example-package) repo, click the **Use this template** button to create a new repo with the template.
2626

27+
After cloning your new repo, run the configure script to replace the placeholder names with your own:
28+
29+
```shell
30+
$ php configure.php
31+
```
32+
33+
The script will prompt you for your vendor name, package name, namespace, and other details. You can also run it non-interactively:
34+
35+
```shell
36+
$ php configure.php --no-interaction --author-name="Your Name" --author-email="you@example.com" --vendor-slug="your-vendor" --vendor-namespace="YourVendor" --package-slug="your-package" --class-name="YourPackage" --package-description="Your package description"
37+
```
38+
39+
To preview changes without modifying any files, use `--dry-run`:
40+
41+
```shell
42+
$ php configure.php --dry-run
43+
```
44+
2745
## Developing an Acorn package
2846

2947
Once your package is created, clone your new git repo somewhere on your machine that's accessible from a WordPress site with Acorn installed. To work on a package locally, you can require it by defining a new local repository from the `composer.json` file used for your site/theme:
@@ -58,6 +76,6 @@ $ wp acorn package:discover
5876
roots/sage ....................... DONE
5977
```
6078

61-
::: warning
62-
We have plans to [automate replacing the placeholders in the example package](https://github.com/roots/acorn/issues/271) in the future
79+
::: tip
80+
If you haven't already, run `php configure.php` from the root of your package to replace the placeholder names
6381
:::

0 commit comments

Comments
 (0)