Skip to content

Conversation

mho22
Copy link
Collaborator

@mho22 mho22 commented Aug 18, 2025

Motivation for the change

🚧 This is experimental 🚧

Based on a suggestion made in a comment from this pull request.

This pull request aims to maintain consistency across the different CLI structures.

Implementation details

php-wasm-cli

  • Use yargs to parse options in
  • Rename main.ts as run-cli.ts and rename references
  • Set run-cli.ts file in src/lib directory
  • Set cli.ts file in src directory
  • Create index.ts file in src directory
  • Rename runCLI functions into parseOptionsAndRunCLI
  • Unify yargs usage display between CLIs

xdebug-bridge

  • Rename runCLI functions into parseOptionsAndRunCLI

playground-cli

  • Unify yargs usage display between CLIs
  • Sort directories in playground-cli [ /src > /src/lib & /src/tests ] ?

@mho22 mho22 changed the title [php-wasm] Refactor php-wasm-cli to maintain consistency across different CLIs [ php-wasm ] Refactor php-wasm-cli to maintain consistency across different CLIs Aug 19, 2025
@mho22 mho22 changed the title [ php-wasm ] Refactor php-wasm-cli to maintain consistency across different CLIs [ php-wasm ] Refactor php-wasm-cli to maintain consistency across CLIs Aug 19, 2025
Copy link
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @mho22, these changes look good to me.

Add index.ts file with exportable functions ?

Do we have any need of this today? If not, maybe we can wait until there is a need.

Sort directories in playground-cli [ /src > /src/lib & /src/tests ] ?

If this is generally our pattern in many other Playground and php-wasm packages, this seems like a good idea.

@mho22
Copy link
Collaborator Author

mho22 commented Aug 26, 2025

@brandonpayton

Do we have any need of this today? If not, maybe we can wait until there is a need.

I agree, we'll build this if we need it one day.

If this is generally our pattern in many other Playground and php-wasm packages, this seems like a good idea.

Ok. On it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants