Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
mt-gareth committed Dec 27, 2020
1 parent 5542bd7 commit 6f13d99
Show file tree
Hide file tree
Showing 40 changed files with 9,040 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONSUMER_KEY=
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/vendor
/.idea
/.vscode
/.vagrant
.phpunit.result.cache
.env
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<p align="center">
<img title="Laravel Zero" height="100" src="https://raw.githubusercontent.com/laravel-zero/docs/master/images/logo/laravel-zero-readme.png" />
</p>

<p align="center">
<a href="https://github.com/laravel-zero/framework/actions"><img src="https://img.shields.io/github/workflow/status/laravel-zero/framework/Tests.svg" alt="Build Status"></img></a>
<a href="https://scrutinizer-ci.com/g/laravel-zero/framework"><img src="https://img.shields.io/scrutinizer/g/laravel-zero/framework.svg" alt="Quality Score"></img></a>
<a href="https://packagist.org/packages/laravel-zero/framework"><img src="https://img.shields.io/packagist/dt/laravel-zero/framework.svg" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel-zero/framework"><img src="https://img.shields.io/packagist/v/laravel-zero/framework.svg?label=stable" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel-zero/framework"><img src="https://img.shields.io/packagist/l/laravel-zero/framework.svg" alt="License"></a>
</p>

<h4> <center>This is a <bold>community project</bold> and not an official Laravel one </center></h4>

Laravel Zero was created by, and is maintained by [Nuno Maduro](https://github.com/nunomaduro), and is a micro-framework that provides an elegant starting point for your console application. It is an **unofficial** and customized version of Laravel optimized for building command-line applications.

- Built on top of the [Laravel](https://laravel.com) components.
- Optional installation of Laravel [Eloquent](https://laravel-zero.com/docs/database/), Laravel [Logging](https://laravel-zero.com/docs/logging/) and many others.
- Supports interactive [menus](https://laravel-zero.com/docs/build-interactive-menus/) and [desktop notifications](https://laravel-zero.com/docs/send-desktop-notifications/) on Linux, Windows & MacOS.
- Ships with a [Scheduler](https://laravel-zero.com/docs/task-scheduling/) and a [Standalone Compiler](https://laravel-zero.com/docs/build-a-standalone-application/).
- Integration with [Collision](https://github.com/nunomaduro/collision) - Beautiful error reporting

------

## Documentation

For full documentation, visit [laravel-zero.com](https://laravel-zero.com/).

## Support the development
**Do you like this project? Support it by donating**

- PayPal: [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L)
- Patreon: [Donate](https://www.patreon.com/nunomaduro)

## License

Laravel Zero is an open-source software licensed under the MIT license.
Empty file added app/Commands/.gitkeep
Empty file.
38 changes: 38 additions & 0 deletions app/Commands/CheckSettingsCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace App\Commands;

use LaravelZero\Framework\Commands\Command;

class CheckSettingsCommand extends Command
{
/**
* The signature of the command.
*
* @var string
*/
protected $signature = 'check:config
{site_config_file : The JSON file that holds the site info (required)}
';

/**
* The description of the command.
*
* @var string
*/
protected $description = 'Confirm that all settings on this new site look good';

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//check config file exits
//check Folder is not there
//check mysql is running
//check url is not taken local and staging
//check bitbucket project key
}
}
55 changes: 55 additions & 0 deletions app/Commands/Run.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php

namespace App\Commands;

use App\MTSite;
use App\Traits\GetConfigFile;
use App\Traits\MustRunProcess;
use LaravelZero\Framework\Commands\Command;


class Run extends Command
{
use MustRunProcess;
use GetConfigFile;
/**
* The signature of the command.
*
* @var string
*/
protected $signature = 'run
{site_config_file : The JSON file that holds the site info (required)}';

/**
* The description of the command.
*
* @var string
*/
protected $description = 'The main script to make the site and do all the fun stuff';

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$site_config_file = $this->argument( 'site_config_file' );

$this->call( 'setup:local-wp', [ 'site_config_file' => $site_config_file ] );
$this->call( 'setup:wp-plugins', [ 'site_config_file' => $site_config_file ] );
$this->call( 'setup:wp-theme', [ 'site_config_file' => $site_config_file ] );
$this->call( 'setup:wp-cpt', [ 'site_config_file' => $site_config_file ] );
$this->call( 'setup:wp-flex', [ 'site_config_file' => $site_config_file ] );
$this->call( 'setup:wp-pages', [ 'site_config_file' => $site_config_file ] );
$this->call( 'setup:git', [ 'site_config_file' => $site_config_file ] );
$this->call( 'setup:bitbucket', [ 'site_config_file' => $site_config_file ] );
$this->call( 'setup:forge', [ 'site_config_file' => $site_config_file ] );
$this->call( 'setup:local-mamp', [ 'site_config_file' => $site_config_file ] );

return true;
}



}
42 changes: 42 additions & 0 deletions app/Commands/SetupForgeCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace App\Commands;

use App\MTSite;
use LaravelZero\Framework\Commands\Command;

class SetupForgeCommand extends Command
{
/**
* The signature of the command.
*
* @var string
*/
protected $signature = 'setup:forge
{site_config_file : The JSON file that holds the site info (required)}
';

/**
* The description of the command.
*
* @var string
*/
protected $description = 'Setup Forge';

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$mt_site = MTSite::getInstance($this->argument( 'site_config_file' ));

$this->task( $this->description, function () use ( $mt_site ) {
return $mt_site->setup_forge();
} );

return true;
}

}
42 changes: 42 additions & 0 deletions app/Commands/SetupGitBitcketCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace App\Commands;

use App\MTSite;
use LaravelZero\Framework\Commands\Command;

class SetupGitBitcketCommand extends Command
{
/**
* The signature of the command.
*
* @var string
*/
protected $signature = 'setup:bitbucket
{site_config_file : The JSON file that holds the site info (required)}
';

/**
* The description of the command.
*
* @var string
*/
protected $description = 'Setup Bitbucket';

/**
* Execute the console command.
*
* @return mixed
* @throws \Http\Client\Exception
*/
public function handle()
{
$mt_site = MTSite::getInstance($this->argument( 'site_config_file' ));

$this->task( $this->description, function () use ( $mt_site ) {
return $mt_site->setup_bitbucket();
} );

return true;
}
}
42 changes: 42 additions & 0 deletions app/Commands/SetupGitCommitCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace App\Commands;

use App\MTSite;
use LaravelZero\Framework\Commands\Command;

class SetupGitCommitCommand extends Command
{
/**
* The signature of the command.
*
* @var string
*/
protected $signature = 'setup:git
{site_config_file : The JSON file that holds the site info (required)}
';

/**
* The description of the command.
*
* @var string
*/
protected $description = 'Setup Git';

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$mt_site = MTSite::getInstance($this->argument( 'site_config_file' ));

$this->task( $this->description, function () use ( $mt_site ) {
return $mt_site->setup_git();
} );

return true;
}

}
42 changes: 42 additions & 0 deletions app/Commands/SetupLocalMampCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace App\Commands;

use App\MTSite;
use LaravelZero\Framework\Commands\Command;

class SetupLocalMampCommand extends Command
{
/**
* The signature of the command.
*
* @var string
*/
protected $signature = 'setup:local-mamp
{site_config_file : The JSON file that holds the site info (required)}
';

/**
* The description of the command.
*
* @var string
*/
protected $description = 'Adds the host to MAMP';

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$mt_site = MTSite::getInstance($this->argument( 'site_config_file' ));

$this->task( $this->description, function () use ( $mt_site ) {
return $mt_site->setup_local_mamp();
} );

return true;
}

}
41 changes: 41 additions & 0 deletions app/Commands/SetupLocalWpCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace App\Commands;

use App\MTSite;
use LaravelZero\Framework\Commands\Command;

class SetupLocalWpCommand extends Command
{
/**
* The signature of the command.
*
* @var string
*/
protected $signature = 'setup:local-wp
{site_config_file : The JSON file that holds the site info (required)}
';

/**
* The description of the command.
*
* @var string
*/
protected $description = 'Sets up the Folder, installs WP files, sets wp-config, and installs DB';

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$mt_site = MTSite::getInstance($this->argument( 'site_config_file' ));

$this->task( $this->description, function () use ( $mt_site ) {
return $mt_site->setup_local_wp();
} );

return true;
}
}
Loading

0 comments on commit 6f13d99

Please sign in to comment.