New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI tool #296

Closed
jlambe opened this Issue Mar 23, 2016 · 16 comments

Comments

7 participants
@jlambe
Copy link
Contributor

jlambe commented Mar 23, 2016

Explore wp-cli packages and perhaps provide a themosis command...

What kind of commands (sub-commands) do you think would be interesting to develop?

@lucprincen

This comment has been minimized.

Copy link

lucprincen commented Mar 23, 2016

Specifically for Themosis I'd love to see scaffolding commands to create overview and singular views, routing, a controller and a model for a specific post-type for instance...

@ramon-villain

This comment has been minimized.

Copy link
Contributor

ramon-villain commented Mar 23, 2016

  1. Enviroment:
    wp themosis env
    wp themosis env --development='Home.lan'
  2. Htdocs renaming (themosis/themosis#65)
  3. Generate a new "themosis-theme"
  4. Image size maker (images.config.php)
  5. Namespace changer (application.config.php)
  6. Supports Manager (supports.config.php)
@jlambe

This comment has been minimized.

Copy link
Contributor

jlambe commented Mar 24, 2016

@chefduweb @ramon-villain This is out-of-scope, but I was thinking... would it be great, maybe better, to create custom post type by simply adding a model class? Then the scaffold would provide a class with extra methods to retrieve, update, delete custom post types.

@ramon-villain Generally perhaps provide a command to alter any config file value + an utility to re-calculate image sizes?

@ramon-villain

This comment has been minimized.

Copy link
Contributor

ramon-villain commented Mar 25, 2016

Yes! This would help a lot!

@lucprincen

This comment has been minimized.

Copy link

lucprincen commented Mar 25, 2016

Definitely helpful!
I get that doing file-creation is out-of-scope, but adding the methods would be a big win :)

@rovillesarate

This comment has been minimized.

Copy link

rovillesarate commented Mar 26, 2016

+1 for the scaffold via model class. This will be very useful.

@jlambe jlambe referenced this issue Aug 1, 2016

Closed

Custom Fields #29

@mickaelperrin

This comment has been minimized.

Copy link

mickaelperrin commented Jun 1, 2017

I don't know if this the good place for this, but I was looking for a way to interact with a console controller like with the symfony console.

Does themosis already provides something or should we use wp-cli for this ?

@jlambe

This comment has been minimized.

Copy link
Contributor

jlambe commented Jun 1, 2017

@mickaelperrin No there are no such class available.

Right now the WP-Cli has its own class in order to register commands. We suggest you to follow their guidelines if you want to write your own cli commands.

@terence1990

This comment has been minimized.

Copy link

terence1990 commented Jul 14, 2017

Could also make it possible to publish vendor config files automatically, at the moment i'm just telling users to add the config file manually. Some great ideas here!

@jlambe

This comment has been minimized.

Copy link
Contributor

jlambe commented Jul 15, 2017

@terence1990 Not sure to understand what you're looking for by "publish vendor config files automatically". Could you describe your feature in details ?

@terence1990

This comment has been minimized.

Copy link

terence1990 commented Jul 15, 2017

Hey @jlambe, sorry for the lack of explanation.

Basically I am buildIng components for Themosis but these components often require config files to be placed in config folder of Themosis theme, but not limited to the theme, it could be loaded into the config folder of a Themosis plugin.

Instead of explicitly setting these config values in some kind of default in the Service Provider we could adopt the approach Laravel takes with its vendor publish commands:

php artisan vendor:publish

Which basically calls the ::boot method on the Service Provider where the Service Provider can call ::loadConfigFrom or ::loadViewsFrom. That's all part of Illuminate Support but we would need to mirror how artisan does this and write a command for WP CLI and patch it to place the files correct in the Themosis theme / plugin resources folder with the correct filename conventions - perhaps using a namespace option on the command.

More info on vendor:publish is below:

https://laravel.com/docs/5.0/packages

@jlambe

This comment has been minimized.

Copy link
Contributor

jlambe commented Jul 18, 2017

@terence1990 Sounds like a great feature! A user might alter a plugin configuration by adding a configuration into the theme then, right ?

@terence1990

This comment has been minimized.

Copy link

terence1990 commented Jul 18, 2017

@jlambe potentially, if ConfigFactory checks theme config first before plugin then that would work.

I'll take a look at artisan and see how it achieves what it does through the publish command and work out if we can do the same with a WP CLI command

@jlambe jlambe changed the title WP-CLI package CLI tool Apr 5, 2018

@jlambe jlambe added this to To Do in Framework 2.x via automation Apr 5, 2018

@jlambe jlambe added the module:cli label Apr 5, 2018

@jlambe jlambe self-assigned this Apr 5, 2018

@jlambe jlambe added this to the 1.4.0 milestone Apr 5, 2018

@jlambe jlambe moved this from To Do to In progress in Framework 2.x Aug 22, 2018

@jlambe

This comment has been minimized.

Copy link
Contributor

jlambe commented Aug 24, 2018

Well we've implemented the Illuminate\Console package (which leverages the Symfony Console class). We're going to provide a list of default commands with the next release. Probably we won't cover all your needs but if you have any other suggestions for commands to be bundled by default with the framework, just share them with us over here ;)

@jlambe jlambe moved this from In progress to Review in Framework 2.x Aug 24, 2018

@marcwieland95

This comment has been minimized.

Copy link

marcwieland95 commented Aug 24, 2018

Assely has already CLI commands in place:
Assely WP-CLI

As @lucprincen suggested, some make command are really appreciated:
wp assely:make posttype <classname>

@jlambe

This comment has been minimized.

Copy link
Contributor

jlambe commented Aug 24, 2018

@marcwieland95 This is planned, now that we have a central location for building the application, it is easier to provide those scaffolding helpers.

@jlambe jlambe closed this in 4652d54 Nov 3, 2018

Framework 2.x automation moved this from Review to Done Nov 3, 2018

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