-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e621c59
commit c5a6614
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"landingPage": "/wp-admin/post.php?post=1&action=edit", | ||
"preferredVersions": { | ||
"php": "8.0", | ||
"wp": "latest" | ||
}, | ||
"phpExtensionBundles": ["kitchen-sink"], | ||
"features": {}, | ||
"steps": [ | ||
{ | ||
"step": "login", | ||
"username": "admin", | ||
"password": "password" | ||
}, | ||
{ | ||
"step": "installPlugin", | ||
"pluginZipFile": { | ||
"resource": "wordpress.org/plugins", | ||
"slug": "interactive-code-block" | ||
}, | ||
"options": { | ||
"activate": true | ||
} | ||
}, | ||
{ | ||
"step": "unzip", | ||
"extractToPath": "/tmp", | ||
"zipFile": { | ||
"resource": "url", | ||
"url": "https://github-proxy.com/proxy/?repo=ryanwelcher/twitch&directory=plugins/htm-no-build" | ||
} | ||
}, | ||
{ | ||
"step": "mv", | ||
"fromPath": "/tmp/plugins/htm-no-build", | ||
"toPath": "/wordpress/wp-content/plugins/htm-no-build" | ||
}, | ||
{ | ||
"step": "activatePlugin", | ||
"pluginPath": "htm-no-build/htm-no-build.php" | ||
}, | ||
{ | ||
"step": "resetData" | ||
}, | ||
{ | ||
"step": "runPHP", | ||
"code": "<?php\nrequire '/wordpress/wp-load.php';\n$page_id = wp_insert_post( [\n\t'post_type' => 'page',\n\t'post_status' => 'publish',\n\t'post_title' => 'HTM instead of JSX',\n\t'post_content' => '<!-- wp:twitch-streams/htm-no-build /-->\n<!-- wp:paragraph --><p>The above block doesn\\'t use a build process but still is able to use JSX like syntax provided by the <a href=\"https://github.com/developit/htm\">htm</a> library.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>See the <a href=\"https://github.com/ryanwelcher/twitch/tree/trunk/plugins/htm-no-build\">source code here</a>.</p><!-- /wp:paragraph --><!-- wp:wordpress-playground/playground {\"codeEditor\":true,\"codeEditorSideBySide\":false,\"codeEditorReadOnly\":true,\"constants\":\"eyJXUF9ERUJVRyI6dHJ1ZSwiV1BfU0NSSVBUX0RFQlVHIjp0cnVlfQ==\",\"files\":[\"W3siY29udGVudHMiOiIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgaHRtIGZyb20gJ2h0bSc7XG4vLyBCaW5kIHRoZSBgaHRtbGAgZnVuY3Rpb24gdG8gdGhlIGBSZWFjdC5jcmVhdGVFbGVtZW50YCBmdW5jdGlvbi5cbmNvbnN0IGh0bWwgPSBodG0uYmluZChSZWFjdC5jcmVhdGVFbGVtZW50KTtcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmNvbnN0IHsgdXNlQmxvY2tQcm9wcywgUmljaFRleHQgfSA9IHdwLmJsb2NrRWRpdG9yO1xuY29uc3QgeyBfXyB9ID0gd3AuaTE4bjtcblxuY29uc3QgRWRpdCA9ICh7IGF0dHJpYnV0ZXM6IHsgbWVzc2FnZSA9ICdEZWZhdWx0IHZhbHVlJyB9LCBzZXRBdHRyaWJ1dGVzIH0pID0+IHtcblx0cmV0dXJuIGh0bWxgXG5cdFx0PCR7UmljaFRleHR9XG5cdFx0XHQuLi4ke3VzZUJsb2NrUHJvcHMoKX1cblx0XHRcdHZhbHVlPVwiJHttZXNzYWdlfVwiXG5cdFx0XHR0YWdOYW1lPVwicFwiXG5cdFx0XHRvbkNoYW5nZT1cIiR7KG1lc3NhZ2UpID0+IHNldEF0dHJpYnV0ZXMoeyBtZXNzYWdlIH0pfVwiXG5cdFx0Lz5cblx0YDtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEVkaXQ7XG4iLCJuYW1lIjo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