Step name normalise (#47)

* steps name normalised

* fix step naming folder order in webpack config

* update class-register-step steps naming
This commit is contained in:
Cy-Yaksh 2025-01-06 16:07:53 +05:30 committed by GitHub
parent 15f0184d37
commit cc14b94586
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 36 additions and 39 deletions

View file

@ -8,40 +8,37 @@

namespace WP\Admin\PlaygroundBlueprintEditor;

class BlueprintSteps
{
class BlueprintSteps {
/**
* Construct that hooks into WordPress to initialize blueprint steps.
*/
public function __construct()
{
public function __construct() {
add_action('init', [$this, 'register_blueprint_steps']);
}

/**
* Registers the 'blueprint steps' with necessary arguments and labels.
*/
public function register_blueprint_steps()
{
public function register_blueprint_steps() {
$blueprint_steps = [
'login',
'install-plugin',
'enable-multisite',
'copy',
'cp',
'install-theme',
'define-site-url',
'activate-theme',
'activate-plugin',
'import-wordpress-files',
'remove-dir',
'remove-file',
'rmdir',
'rm',
'reset-data',
'move',
'mv',
'define-wp-config-consts',
'write-file',
'wp-cli',
'run-php',
'make-dir',
'mkdir',
'import-wxr',
'update-user-meta',
'unzip',

View file

@ -22,22 +22,22 @@ function filter_allowed_block_types($allowed_block_types, $block_editor_context)
'playground-step/install-theme',
'playground-step/enable-multisite',
'playground-step/define-site-url',
'playground-step/copy',
'playground-step/cp',
'playground-step/activate-theme',
'playground-step/activate-plugin',
'playground-step/import-wordpress-files',
'playground-step/remove-dir',
'playground-step/remove-file',
'playground-step/rmdir',
'playground-step/rm',
'playground-step/reset-data',
'playground-step/write-file',
'playground-step/move',
'playground-step/mv',
'playground-step/define-wp-config-consts',
'playground-step/wp-cli',
'playground-step/run-php',
'playground-step/unzip',
'playground-step/update-user-meta',
'playground-step/set-site-options',
'playground-step/make-dir',
'playground-step/mkdir',
'playground-step/import-wxr',
'playground-step/set-site-language',
'playground-step/import-theme-starter-content',

View file

@ -1,7 +1,7 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "playground-step/copy",
"name": "playground-step/cp",
"version": "0.1.0",
"title": "Copy",
"category": "file-system",

View file

@ -1,7 +1,7 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "playground-step/make-dir",
"name": "playground-step/mkdir",
"version": "0.1.0",
"title": "Make Directory",
"category": "file-system",

View file

@ -1,7 +1,7 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "playground-step/move",
"name": "playground-step/mv",
"version": "0.1.0",
"title": "Move File/Dir",
"category": "file-system",

View file

@ -1,7 +1,7 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "playground-step/remove-file",
"name": "playground-step/rm",
"version": "0.1.0",
"title": "Remove File",
"category": "file-system",

View file

@ -1,7 +1,7 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "playground-step/remove-dir",
"name": "playground-step/rmdir",
"version": "0.1.0",
"title": "Remove Directory",
"category": "file-system",

View file

@ -7,30 +7,30 @@ module.exports = {
entry: {
...getWebpackEntryPoints(),
'editor': './src/editor/index.js',
'steps/activate-plugin/index': './src/steps/activate-plugin/index.js',
'steps/activate-theme/index': './src/steps/activate-theme/index.js',
'steps/cp/index': './src/steps/cp/index.js',
'steps/define-site-url/index': './src/steps/define-site-url/index.js',
'steps/define-wp-config-consts/index': './src/steps/define-wp-config-consts/index.js',
'steps/enable-multisite/index': './src/steps/enable-multisite/index.js',
'steps/import-theme-starter-content/index': './src/steps/import-theme-starter-content/index.js',
'steps/import-wordpress-files/index': './src/steps/import-wordpress-files/index.js',
'steps/import-wxr/index': './src/steps/import-wxr/index.js',
'steps/install-plugin/index': './src/steps/install-plugin/index.js',
'steps/install-theme/index': './src/steps/install-theme/index.js',
'steps/define-site-url/index': './src/steps/define-site-url/index.js',
'steps/enable-multisite/index': './src/steps/enable-multisite/index.js',
'steps/copy/index': './src/steps/copy/index.js',
'steps/activate-theme/index': './src/steps/activate-theme/index.js',
'steps/activate-plugin/index': './src/steps/activate-plugin/index.js',
'steps/import-wordpress-files/index': './src/steps/import-wordpress-files/index.js',
'steps/remove-dir/index': './src/steps/remove-dir/index.js',
'steps/remove-file/index': './src/steps/remove-file/index.js',
'steps/login/index': './src/steps/login/index.js',
'steps/mkdir/index': './src/steps/mkdir/index.js',
'steps/mv/index': './src/steps/mv/index.js',
'steps/reset-data/index': './src/steps/reset-data/index.js',
'steps/move/index': './src/steps/move/index.js',
'steps/make-dir/index': './src/steps/make-dir/index.js',
'steps/import-wxr/index': './src/steps/import-wxr/index.js',
'steps/import-theme-starter-content/index': './src/steps/import-theme-starter-content/index.js',
'steps/define-wp-config-consts/index': './src/steps/define-wp-config-consts/index.js',
'steps/write-file/index': './src/steps/write-file/index.js',
'steps/wp-cli/index': './src/steps/wp-cli/index.js',
'steps/rm/index': './src/steps/rm/index.js',
'steps/rmdir/index': './src/steps/rmdir/index.js',
'steps/run-php/index': './src/steps/run-php/index.js',
'steps/unzip/index': './src/steps/unzip/index.js',
'steps/set-site-language/index': './src/steps/set-site-language/index.js',
'steps/update-user-meta/index': './src/steps/update-user-meta/index.js',
'steps/set-site-options/index': './src/steps/set-site-options/index.js',
'steps/login/index': './src/steps/login/index.js'
'steps/unzip/index': './src/steps/unzip/index.js',
'steps/update-user-meta/index': './src/steps/update-user-meta/index.js',
'steps/wp-cli/index': './src/steps/wp-cli/index.js',
'steps/write-file/index': './src/steps/write-file/index.js'
},
output: {
path: path.resolve(__dirname, 'build'),