@wp-operations/wp-app 0.1.1 → 0.2.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 +24 -14
- package/dist/index.js +243 -489
- package/dist/main.js +340 -574
- package/package.json +7 -10
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**The `wp-now` revival.** A zero-config local WordPress dev server on `@php-wasm/node`: no Docker, no MySQL, no XAMPP. Point it at a theme, a plugin, or a full core checkout and it starts.
|
|
4
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 —
|
|
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).
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -10,24 +10,30 @@ When `wp-now` was deprecated in favor of the blueprint-centric Playground CLI, t
|
|
|
10
10
|
npm install -g @wp-operations/wp-app
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
Requires Node.js >= 20.10.
|
|
14
|
+
|
|
13
15
|
## Usage
|
|
14
16
|
|
|
15
17
|
```bash
|
|
16
18
|
wp-app start # auto-detects project type from cwd
|
|
17
19
|
wp-app start --path=my-theme # explicit path
|
|
18
|
-
wp-app start --php=8.
|
|
20
|
+
wp-app start --php=8.3 --wp=6.8 # pin PHP / WordPress versions
|
|
19
21
|
wp-app start --wp=classicpress # run ClassicPress instead (lightweight, no Gutenberg)
|
|
20
|
-
wp-app start --port=8881 --reset # fresh
|
|
22
|
+
wp-app start --port=8881 --reset # fresh site (wipes the managed WordPress + database)
|
|
21
23
|
wp-app dev # start + restart on file changes
|
|
22
24
|
wp-app build # composer install + npm build script, when present
|
|
23
25
|
wp-app php -- -r 'echo PHP_VERSION;' # PHP CLI via php-wasm
|
|
26
|
+
wp-app php -- script.php # run a PHP file
|
|
24
27
|
```
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
Login: `admin` / `password`.
|
|
27
30
|
|
|
28
|
-
##
|
|
31
|
+
## How data is stored
|
|
29
32
|
|
|
30
|
-
|
|
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`)
|
|
31
37
|
|
|
32
38
|
## Modes
|
|
33
39
|
|
|
@@ -35,18 +41,22 @@ Auto-detected from the project directory, or forced with `--mode`:
|
|
|
35
41
|
|
|
36
42
|
| Mode | Detected when | What runs |
|
|
37
43
|
|------|--------------|-----------|
|
|
38
|
-
| `theme` | `style.css` with a Theme Name header |
|
|
39
|
-
| `plugin` | PHP file with a Plugin Name header |
|
|
40
|
-
| `wp-content` | `plugins/` + `themes/` dirs |
|
|
41
|
-
| `wordpress` | Full core checkout | Your core, SQLite-backed |
|
|
44
|
+
| `theme` | `style.css` with a Theme Name header | Managed WP + your directory mounted as a theme, auto-activated |
|
|
45
|
+
| `plugin` | PHP file with a Plugin Name header | Managed WP + your directory mounted as a plugin, auto-activated |
|
|
46
|
+
| `wp-content` | `plugins/` + `themes/` dirs | Managed WP + your entries overlaid on `wp-content` |
|
|
47
|
+
| `wordpress` | Full core checkout | Your core served directly, SQLite-backed |
|
|
42
48
|
| `wordpress-develop` | Core dev checkout | The `build/` directory |
|
|
43
|
-
| `index` | An `index.php` | Plain PHP server |
|
|
44
|
-
| `playground` | None of the above (e.g. empty dir) |
|
|
49
|
+
| `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.
|
|
45
55
|
|
|
46
56
|
## Part of wp-operations
|
|
47
57
|
|
|
48
|
-
`wp-app` is the foundation of [wp-operations](https://github.com/wordpress-operations/wordpress-operations) — an open-source operations toolchain for classic WordPress
|
|
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`).
|
|
49
59
|
|
|
50
60
|
## Credits & License
|
|
51
61
|
|
|
52
|
-
GPL-2.0-or-later.
|
|
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 the current [WordPress Playground](https://github.com/WordPress/wordpress-playground) engine (`@php-wasm/*`, `@wp-playground/wordpress`).
|