pphlx 1.0.0 → 1.0.2
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 +48 -14
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,20 +1,44 @@
|
|
|
1
|
-
# PPHLX Compiler
|
|
1
|
+
# PPHLX Compiler
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
> Modern web components. Zero runtime. Pure PHP output.
|
|
8
|
+
|
|
9
|
+
Official Node.js CLI for PPHLX — a high-performance compiler for building modern, component-based PHP applications.
|
|
10
|
+
|
|
11
|
+
Powered by a Go-compiled WebAssembly (WASI) runtime, PPHLX runs consistently on Windows, macOS, and Linux without requiring native compiler installations.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- **🚀 High-performance compiler**: Powered by Go and compiled natively.
|
|
18
|
+
- **⚡ WebAssembly (WASI) powered**: Run anywhere Node.js runs without native compiler dependencies.
|
|
19
|
+
- **📦 Zero runtime in production**: The generated output is standalone, with no node modules.
|
|
20
|
+
- **🧩 Component-based layout**: Build components using your favorite frontend workflows.
|
|
21
|
+
- **🔥 Hot reload**: Fast development server built-in.
|
|
22
|
+
- **🌍 Cross-platform**: Instant startup on Windows, macOS, and Linux.
|
|
23
|
+
- **🐘 Generates pure PHP**: Easily host your builds on any cheap PHP web hosting server.
|
|
6
24
|
|
|
7
25
|
---
|
|
8
26
|
|
|
9
|
-
##
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
Get your project up and running in seconds:
|
|
10
30
|
|
|
11
|
-
Install the package locally in your project:
|
|
12
31
|
```bash
|
|
32
|
+
# Install PPHLX locally
|
|
13
33
|
npm install pphlx
|
|
14
|
-
```
|
|
15
34
|
|
|
16
|
-
|
|
17
|
-
|
|
35
|
+
# Initialize your project configuration
|
|
36
|
+
npx pphlx init
|
|
37
|
+
|
|
38
|
+
# Start the local development server (with hot reload)
|
|
39
|
+
npx pphlx dev
|
|
40
|
+
|
|
41
|
+
# Build for production deployment
|
|
18
42
|
npx pphlx build
|
|
19
43
|
```
|
|
20
44
|
|
|
@@ -22,15 +46,17 @@ npx pphlx build
|
|
|
22
46
|
|
|
23
47
|
## Usage
|
|
24
48
|
|
|
25
|
-
PPHLX
|
|
49
|
+
PPHLX compiles your components into dependency-free, production-ready PHP pages. The generated output requires no Node.js, JavaScript runtime, or PPHLX framework in production.
|
|
50
|
+
|
|
51
|
+
By default, the compiler looks for a configuration file (`pphlx.config.json` or `pphlx.config.mjs`) in the root of your project directory.
|
|
26
52
|
|
|
27
|
-
### Scripts
|
|
28
|
-
Add
|
|
53
|
+
### package.json Scripts
|
|
54
|
+
Add build and development triggers to your project scripts:
|
|
29
55
|
```json
|
|
30
56
|
{
|
|
31
57
|
"scripts": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
58
|
+
"dev": "pphlx dev",
|
|
59
|
+
"build": "pphlx build"
|
|
34
60
|
}
|
|
35
61
|
}
|
|
36
62
|
```
|
|
@@ -39,4 +65,12 @@ Then run:
|
|
|
39
65
|
```bash
|
|
40
66
|
npm run build
|
|
41
67
|
```
|
|
42
|
-
This compiles your
|
|
68
|
+
This compiles your layouts and components into standalone `.php` files inside your output directory.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Project Links
|
|
73
|
+
|
|
74
|
+
- **Website**: [pphlx.org](https://pphlx.org)
|
|
75
|
+
- **GitHub Repository**: [github.com/pphlx/pphlx](https://github.com/pphlx/pphlx)
|
|
76
|
+
- **Discord Community**: [Discord Server](https://discord.gg/9ApeZhsG7G)
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pphlx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "High-performance Monolithic Web Compiler and PHP Hydration CLI",
|
|
5
5
|
"main": "bin/pphlx.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"pphlx": "
|
|
7
|
+
"pphlx": "bin/pphlx.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1"
|