-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monorepo #57
Merged
Merged
Monorepo #57
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adamziel
force-pushed
the
separate-php-from-wp
branch
from
October 22, 2022 00:02
21fdadb
to
8c30a1c
Compare
adamziel
force-pushed
the
separate-php-from-wp
branch
from
October 22, 2022 00:04
8c30a1c
to
c3edcda
Compare
There are some rough edges, but it's a good start so I'll go ahead and merge. |
Follow-up issue: #58 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Restructures the repository as a monorepo and separates the PHP implementation from the WordPress-specific bits.
Notably, this PR removes node.js-specific WordPress setup to help focus on the browser version. Building PHP to WASM with node.js as a target is still supported, but the express.js server and wp-specific logic is gone. Why? There's no good use-case to justify the effort of maintaining it. If one arises, I'm more than happy to bring it back, probably as a separate package.
The new packages:
PHP
JavaScript class witheval
for executing PHP code and FS utils likewriteFile
for runtime managing thePHPServer
JavaScript class for dispatching HTTP requests – both to run the PHP files AND to download static filesPHPBrowser
JavaScript class to consume the above using an iframephp-wasm
in the browserservice-worker
utilities to redirect the browser traffic toPHPServer
worker-thread
utilities to offload thePHPServer
to a separate process. Three backends are available: Iframe, Webworker, SharedWorker.wasm
files via.htaccess
.wp.data
bundling pipeline for the web configurable to bundle custom codefetch
-based transport for HTTP requestsOther, general notes:
build
directory – it would be nice to either move them to their specific packages, or to remove them from the repo entirely. In the latter case the initial build would download them from somewhere to avoid bad developer experience of having to go through a full build before even getting started.esbuild
is used to build each packages and then the entire app.Solves #51 and #16