Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'roots/10.0.0-dev' into 10.0.0-dev
Browse files Browse the repository at this point in the history
* roots/10.0.0-dev:
  Update sponsors [ci skip]
  Bump stylelint from 13.2.1 to 13.3.0 (roots#2439)
  Bump roots/acorn from 1.0.3 to 1.0.4 (roots#2440)
  Bump roots/acorn from 1.0.2 to 1.0.3 (roots#2433)
  Sage 10 Chores (roots#2431)
  enhance(deps): Add `Requires PHP` and `Requires at least` to theme style headers. Bump WordPress requirement to v5.4 (roots#2409)
  Laravel 7.x (roots#2429)
  Sage 10 fixes/cleanup (roots#2413)
  Update sponsors [ci skip]
  update laravel-mix-wp-blocks (roots#2381)
  chore(deps): Bump dependencies (roots#2376)
  fix(stylelint): Fix broken tests (roots#2375)
  Keep hierarchical assets directory structure (roots#2372)
  • Loading branch information
oxyc committed Apr 16, 2020
2 parents bf0db71 + 3c64c3a commit 1d543a8
Show file tree
Hide file tree
Showing 31 changed files with 229 additions and 221 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ indent_size = 2

[resources/views/**.php]
indent_size = 2

[index.php]
indent_size = 2
1 change: 1 addition & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"value-list-comma-newline-after": null,
"no-empty-source": null,
"no-descending-specificity": null,
"at-rule-empty-line-before": null,
"at-rule-no-unknown": [
true,
{
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ See a working example at [roots-example-project.com](https://roots-example-proje

Make sure all dependencies have been installed before moving on:

* [WordPress](https://wordpress.org/) >= 5.2
* [PHP](https://secure.php.net/manual/en/install.php) >= 7.1.3 (with [`php-mbstring`](https://secure.php.net/manual/en/book.mbstring.php) enabled)
* [WordPress](https://wordpress.org/) >= 5.4
* [PHP](https://secure.php.net/manual/en/install.php) >= 7.2.0 (with [`php-mbstring`](https://secure.php.net/manual/en/book.mbstring.php) enabled)
* [Composer](https://getcomposer.org/download/)
* [Node.js](http://nodejs.org/) >= 8.0.0
* [Yarn](https://yarnpkg.com/en/docs/install)
Expand Down Expand Up @@ -114,7 +114,7 @@ Contributions are welcome from everyone. We have [contributing guidelines](https

Help support our open-source development efforts by [becoming a patron](https://www.patreon.com/rootsdev).

<a href="https://kinsta.com/?kaid=OFDHAJIXUDIV"><img src="https://cdn.roots.io/app/uploads/kinsta.svg" alt="Kinsta" width="200" height="150"></a> <a href="https://k-m.com/"><img src="https://cdn.roots.io/app/uploads/km-digital.svg" alt="KM Digital" width="200" height="150"></a> <a href="https://scaledynamix.com/"><img src="https://cdn.roots.io/app/uploads/scale-dynamix.svg" alt="Scale Dynamix" width="200" height="150"></a> <a href="https://wisdomplugin.com/?sage"><img src="https://cdn.roots.io/app/uploads/wisdom.svg" alt="Wisdom" width="200" height="150"></a>
<a href="https://kinsta.com/?kaid=OFDHAJIXUDIV"><img src="https://cdn.roots.io/app/uploads/kinsta.svg" alt="Kinsta" width="200" height="150"></a> <a href="https://k-m.com/"><img src="https://cdn.roots.io/app/uploads/km-digital.svg" alt="KM Digital" width="200" height="150"></a> <a href="https://nestify.io/?utm_source=roots&utm_medium=banner&utm_campaign=footer"><img src="https://cdn.roots.io/app/uploads/nestify.svg" alt="Nestify" width="200" height="150"></a>

## Community

Expand Down
45 changes: 45 additions & 0 deletions app/View/Components/Alert.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace App\View\Components;

use Roots\Acorn\View\Component;

class Alert extends Component
{
/**
* The alert type.
*
* @var string
*/
public $type;

/**
* The alert message.
*
* @var string
*/
public $message;

/**
* Create the component instance.
*
* @param string $type
* @param string $message
* @return void
*/
public function __construct($type = 'primary', $message = null)
{
$this->type = $type;
$this->message = $message;
}

/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\View\View|string
*/
public function render()
{
return $this->view('components.alert');
}
}
2 changes: 1 addition & 1 deletion app/Composers/App.php → app/View/Composers/App.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Composers;
namespace App\View\Composers;

use Roots\Acorn\View\Composer;

Expand Down
2 changes: 1 addition & 1 deletion app/Composers/Post.php → app/View/Composers/Post.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Composers;
namespace App\View\Composers;

use Roots\Acorn\View\Composer;

Expand Down
3 changes: 0 additions & 3 deletions app/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

/**
* Theme admin.
*
* @copyright https://roots.io/ Roots
* @license https://opensource.org/licenses/MIT MIT
*/

namespace App;
Expand Down
3 changes: 0 additions & 3 deletions app/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

/**
* Theme filters.
*
* @copyright https://roots.io/ Roots
* @license https://opensource.org/licenses/MIT MIT
*/

namespace App;
Expand Down
3 changes: 0 additions & 3 deletions app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

/**
* Theme helpers.
*
* @copyright https://roots.io/ Roots
* @license https://opensource.org/licenses/MIT MIT
*/

namespace App;
Expand Down
16 changes: 4 additions & 12 deletions app/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

/**
* Theme setup.
*
* @copyright https://roots.io/ Roots
* @license https://opensource.org/licenses/MIT MIT
*/

namespace App;
Expand Down Expand Up @@ -55,15 +52,10 @@
*/
add_action('enqueue_block_editor_assets', function () {
if ($manifest = asset('scripts/manifest.asset.php')->get()) {
wp_enqueue_script('sage/vendor.js', asset('scripts/vendor.js')->uri(), ['jquery'], null, true);
wp_enqueue_script(
'sage/editor.js',
asset('scripts/editor.js')->uri(),
array_merge($manifest['dependencies'], ['sage/vendor.js']),
$manifest['version']
);

wp_add_inline_script('sage/editor.js', asset('scripts/manifest.js')->contents(), 'before');
wp_enqueue_script('sage/vendor.js', asset('scripts/vendor.js')->uri(), $manifest['dependencies'], null, true);
wp_enqueue_script('sage/editor.js', asset('scripts/editor.js')->uri(), ['sage/vendor.js'], null, true);

wp_add_inline_script('sage/vendor.js', asset('scripts/manifest.js')->contents(), 'before');
}

wp_enqueue_style('sage/editor.css', asset('styles/editor.css')->uri(), false, null);
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
}
},
"require": {
"php": "^7.2",
"roots/acorn": "dev-master"
"php": "^7.2.5",
"roots/acorn": "^1.0.1"
},
"require-dev": {
"filp/whoops": "^2.5",
"filp/whoops": "^2.7",
"squizlabs/php_codesniffer": "^3.5"
},
"suggest": {
Expand All @@ -59,7 +59,7 @@
"prefer-stable": true,
"scripts": {
"lint": [
"phpcs --ignore=vendor,resources,storage,dist --extensions=php --standard=PSR12 ."
"phpcs --ignore=index.php,vendor,resources,storage,dist --extensions=php --standard=PSR12 ."
],
"post-autoload-dump": [
"Roots\\Acorn\\ComposerScripts::postAutoloadDump"
Expand Down
14 changes: 12 additions & 2 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,20 @@
*/

'providers' => [
/**
* Package Service Providers
*/
// ExamplePackage\Providers\ExamplePackageServiceProvider::class,

/**
* Application Service Providers
*/
App\Providers\ThemeServiceProvider::class,
// App\SomeService\SomeServiceServiceProvider::class,
],

/*
|--------------------------------------------------------------------------
| Class Aliases (formerly "Facades")
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
Expand All @@ -137,6 +144,7 @@

'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
Expand All @@ -152,6 +160,7 @@
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
Expand All @@ -166,6 +175,7 @@
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
Expand Down
8 changes: 4 additions & 4 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used.
| The "local" disk, as well as a variety of cloud-based disks are
| available to your application. Just store away!
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/

Expand Down Expand Up @@ -39,7 +39,7 @@
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/

Expand Down
16 changes: 13 additions & 3 deletions config/logging.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;

Expand Down Expand Up @@ -27,7 +28,7 @@
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Acorn uses the Monolog PHP logging library. This gives
| the box, the framework uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
Expand All @@ -39,7 +40,7 @@
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['daily'],
'channels' => ['single'],
'ignore_exceptions' => false,
],

Expand All @@ -59,7 +60,7 @@
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Sage Log',
'username' => 'App Log',
'emoji' => ':boom:',
'level' => 'critical',
],
Expand Down Expand Up @@ -92,5 +93,14 @@
'driver' => 'errorlog',
'level' => 'debug',
],

'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],

'emergency' => [
'path' => storage_path('logs/sage.log'),
],
],
];
42 changes: 0 additions & 42 deletions config/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,6 @@
// 'MyPlugin' => WP_PLUGIN_DIR . '/my-plugin/resources/views',
],

/*
|--------------------------------------------------------------------------
| View Composers
|--------------------------------------------------------------------------
|
| View composers allow data to always be passed to certain views. This can
| be useful when passing data to components such as hero elements,
| navigation, banners, etc.
|
*/

'composers' => [
// App\Composers\Alert::class,
],

/*
|--------------------------------------------------------------------------
| View Directives
Expand All @@ -92,31 +77,4 @@
'directives' => [
'asset' => Roots\Acorn\Assets\AssetDirective::class,
],

/*
|--------------------------------------------------------------------------
| Blade Component Aliases
|--------------------------------------------------------------------------
|
| Component aliases allow you to use a shorthand to call a Blade component.
| Instead of referencing your components like this:
|
| @component('components.alert', ['type' => 'warning'])
| {{ __('Page not found') }}
| @endcomponent
|
| You can use an alias instead:
|
| @alert(['type' => 'error'])
| {{ __('Page not found') }}
| @endalert
|
| Use the key to set the alias and the value to set the path to the
| view.
|
*/

'components' => [
'alert' => 'components.alert',
],
];
Loading

0 comments on commit 1d543a8

Please sign in to comment.