Giter VIP home page Giter VIP logo

wp-cli's Introduction

Adeliom LumberJack CLI

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

Installation

You can install the package via composer:

composer config repositories.adeliom-wp-cli vcs https://adeliom:[email protected]/adeliom/wp-cli
composer require adeliom/wp-cli

Once installed you need to copy the console file into your Lumberjack theme directory.

It is assuming you're using Lumberjack inside Bedrock. If not, you may need to make some changes to paths in the console file

Basic Usage

You can now access the Adeliom CLI from inside your Lumberjack theme directory:

Available commands

  help                    Displays help for a command
  list                    Lists commands
 make
  make:admin              Create a Admin
  make:ajax               Create a Ajax Action
  make:controller         Create a Controller
  make:cron               Create a Cron Job
  make:env                Create a environement
  make:event              Create a Event Listener
  make:exception          Create a Exception
  make:flex-layout        Create a FlexibleLayout
  make:form               Create a Form
  make:hook               Create a Hooks Class
  make:posttype           Create a PostType
  make:provider           Create a ServiceProvider
  make:taxonomy           Create a Taxonomy
  make:viewmodel          Create a ViewModel
 route
  route:list              List all registered routes

To show available commands

php console list

To run a command

For a given command called test:command you would run the following:

php console test:command

Get additional help about a command

For a given command called test:command you would run the following:

php console help test:command

Adding Commands

To add additional commands to Adeliom CLI add them to config/commands.php (create the file if it doesn't exist).

// config/commands.php

return [
    'commands' => [
        MyCommand::class,
    ],
];

Writing Commands

Create a subclass of Adeliom\WP\CLI\Commands\Command:

namespace MyNamespace;

use Adeliom\WP\CLI\Commands\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ControllerMake extends Command
{
    protected $signature = 'test:command {paramName : The description of the parameter}';

    protected $description = 'A description of the command';

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        // Command implementation
    }
}

Adeliom CLI uses the same $signature syntax as Laravel, see here for more information.

Adeliom CLI Command is a subclass of Symfony's Command object, for more information on how to implement the execute() function see here.

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

wp-cli's People

Contributors

aritti avatar antoinewaag avatar

Watchers

Adeliom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.