phero icon indicating copy to clipboard operation
phero copied to clipboard

Improve command-redirects

Open JasperH8g opened this issue 1 year ago • 0 comments

At the moment, phero server build is identical to ./node_modules/.bin/phero-server build (we call these "command-redirects"). This means though, that when you're in a higher-level directory (the root of a mono-repo for example), you need to go to the server-dir first before you can run this command. The same goes for phero client watch.

What we can do is figure out how many client/server projects you've got and when we end up with 1 result, run that command in that dir directly. When you've got multiple client-projects, we can give the user a choice in what project the command needs to run. This means that you can stay in the root of your project and run phero server export directly.

On the other hand: When you're already in the directory of one of the projects, you should be able to leave out the "server" or "client" part of the redirect. When you're in a client-project, phero build should be identical to phero client build or ./node_modules/.bin/phero-client build.

JasperH8g avatar Mar 01 '23 08:03 JasperH8g