@wp-operations/wp-app 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -34
- package/dist/index.js +345 -109
- package/dist/main.js +896 -322
- package/package.json +5 -8
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# @wp-operations/wp-app
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
When `wp-now` was deprecated in favor of the blueprint-centric Playground CLI, the simple `wp-now start` workflow went with it. `wp-app` brings it back — same one-command experience, running on the **current** php-wasm engine (PHP 7.4 – 8.5).
|
|
3
|
+
A zero-config local WordPress dev server on `@php-wasm/node`: no Docker, no MySQL, no XAMPP. Point it at a theme, a plugin, a full core checkout, or a wp-app project, and it starts.
|
|
6
4
|
|
|
7
5
|
## Install
|
|
8
6
|
|
|
@@ -15,48 +13,37 @@ Requires Node.js >= 20.10.
|
|
|
15
13
|
## Usage
|
|
16
14
|
|
|
17
15
|
```bash
|
|
18
|
-
wp-app start
|
|
19
|
-
wp-app start --path=my-
|
|
20
|
-
wp-app start --php=8.3 --wp=6.8
|
|
21
|
-
wp-app start --wp=classicpress
|
|
22
|
-
wp-app start --port=8881 --reset
|
|
23
|
-
wp-app dev
|
|
24
|
-
wp-app build
|
|
25
|
-
wp-app
|
|
26
|
-
wp-app
|
|
16
|
+
wp-app start
|
|
17
|
+
wp-app start --path=my-app
|
|
18
|
+
wp-app start --php=8.3 --wp=6.8
|
|
19
|
+
wp-app start --wp=classicpress
|
|
20
|
+
wp-app start --port=8881 --reset
|
|
21
|
+
wp-app dev
|
|
22
|
+
wp-app build
|
|
23
|
+
wp-app install
|
|
24
|
+
wp-app update
|
|
25
|
+
wp-app create my-app
|
|
26
|
+
wp-app php -- -r 'echo PHP_VERSION;'
|
|
27
|
+
wp-app php -- script.php
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
Login: `admin` / `password`.
|
|
30
31
|
|
|
31
|
-
## How data is stored
|
|
32
|
-
|
|
33
|
-
- Core downloads are cached once in `~/.wp-app/cache/`
|
|
34
|
-
- Each project gets a full persistent WordPress site in `~/.wp-app/sites/<project>-<hash>/` — files and SQLite database survive restarts; `--reset` deletes exactly this directory and never your project
|
|
35
|
-
- Your project directory is mounted *into* that site (as a theme, plugin, or wp-content overlay) — edits are live without restarts
|
|
36
|
-
- Set the `WP_APP_HOME` environment variable to relocate all of the above (CI, portable drives, or the `.local` repo convention via `@wp-operations/wp-ide`)
|
|
37
|
-
|
|
38
32
|
## Modes
|
|
39
33
|
|
|
40
|
-
Auto-detected from the project directory, or forced with `--mode
|
|
34
|
+
Auto-detected from the project directory, or forced with `--mode`. Checked in this order — first match wins:
|
|
41
35
|
|
|
42
36
|
| Mode | Detected when | What runs |
|
|
43
37
|
|------|--------------|-----------|
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
38
|
+
| `wp-app` | `composer.json` with `"type": "wp-app"` | `wp-app` |
|
|
39
|
+
| `wordpress` | Full WordPress core checkout | Your core served directly, SQLite-backed |
|
|
40
|
+
| `classicpress` | Full ClassicPress core checkout | Your core served directly, SQLite-backed |
|
|
46
41
|
| `wp-content` | `plugins/` + `themes/` dirs | Managed WP + your entries overlaid on `wp-content` |
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
42
|
+
| `plugin` | PHP file with a Plugin Name header | Managed WP + your directory mounted as a plugin, auto-activated |
|
|
43
|
+
| `theme` | `style.css` with a Theme Name header | Managed WP + your directory mounted as a theme, auto-activated |
|
|
49
44
|
| `index` | An `index.php` | Plain PHP server, no WordPress |
|
|
50
|
-
| `playground` | None of the above (e.g. empty dir) | Fresh managed install |
|
|
51
|
-
|
|
52
|
-
## ClassicPress
|
|
53
|
-
|
|
54
|
-
`--wp=classicpress` fetches the latest ClassicPress release; `--wp=classicpress-2.4.1` pins a version. Everything else (modes, SQLite, mounts) works identically.
|
|
55
|
-
|
|
56
|
-
## Part of wp-operations
|
|
57
45
|
|
|
58
|
-
`wp-app` is the foundation of [wp-operations](https://github.com/wordpress-operations/wordpress-operations) — an open-source operations toolchain for classic WordPress development: PSR-4 vendor packages as plugins, an AI skills library with security guidelines, monorepo tooling (`@wp-operations/wp-ide`), and a unified operations CLI (`@wp-operations/wp-ops`).
|
|
59
46
|
|
|
60
|
-
##
|
|
47
|
+
## License
|
|
61
48
|
|
|
62
|
-
GPL-2.0-or-later. Continues the workflow of [`@wp-now/wp-now`](https://github.com/WordPress/playground-tools) by the WordPress contributors, rebuilt on
|
|
49
|
+
GPL-2.0-or-later. Continues the workflow of [`@wp-now/wp-now`](https://github.com/WordPress/playground-tools) by the WordPress contributors, rebuilt on `@php-wasm/*`.
|