Skip to content
Snippets Groups Projects
Verified Commit 108f1fa6 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

feat: remove compilation command


After thinking for some time, I've decided to get rid of compilation
command. This would be useful to compile container and plugin data at
build-time, but for the container the task is not trivial.

Compilation would require WordPress runtime, so the only viable solution
would be to boot whole WordPress with database. Removing the use of
WordPress functions wouldn't be possible or at least required some
common WP functions to be rewritten in our codebase.

For current approach, I bias towards compilation in customer's
environment at first runtime, with graceful handling of any IO operation
issues.

Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
parent 19c05c0f
No related branches found
No related tags found
2 merge requests!5feat: remove compilation command,!4feat: remove compilation command
#!/usr/bin/env php
<?php
use WPDesk\Init\Util\PhpFileDumper;
include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';
$filename = $argv[1] ?? null;
$parser = new \WPDesk\Init\Plugin\DefaultHeaderParser();
$data = $parser->parse( $filename );
$dumper = new PhpFileDumper();
$dumper->dump( $parser->parse( $filename ), $argv[2] );
//echo "Compile static plugin resources.";
...@@ -20,9 +20,6 @@ ...@@ -20,9 +20,6 @@
"role": "Developer" "role": "Developer"
} }
], ],
"bin": [
"bin/wpinit"
],
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"WPDesk\\Init\\": "src" "WPDesk\\Init\\": "src"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment