From 8cacedf5f7e8b04f2ebe3224a49d026e7f7746d9 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 26 Sep 2017 17:13:48 -0400 Subject: [PATCH] Update the blade-extensions config --- config/blade-extensions.php | 66 +++++++++++++++++++++++++++++ config/blade_extensions.php | 82 ------------------------------------- 2 files changed, 66 insertions(+), 82 deletions(-) create mode 100644 config/blade-extensions.php delete mode 100644 config/blade_extensions.php diff --git a/config/blade-extensions.php b/config/blade-extensions.php new file mode 100644 index 0000000..030eea1 --- /dev/null +++ b/config/blade-extensions.php @@ -0,0 +1,66 @@ + [ + 'set' => 'Radic\\BladeExtensions\\Directives\\SetDirective', + 'unset' => 'Radic\\BladeExtensions\\Directives\\UnsetDirective', + + 'breakpoint' => 'Radic\\BladeExtensions\\Directives\\BreakpointDirective', + 'dump' => 'Radic\\BladeExtensions\\Directives\\DumpDirective', + + 'foreach' => 'Radic\\BladeExtensions\\Directives\\ForeachDirective', + 'endforeach' => 'Radic\\BladeExtensions\\Directives\\EndforeachDirective', + 'break' => 'Radic\\BladeExtensions\\Directives\\BreakDirective', + 'continue' => 'Radic\\BladeExtensions\\Directives\\ContinueDirective', + + 'embed' => 'Radic\\BladeExtensions\\Directives\\EmbedDirective' + +// 'closure' => function ($value) { +// return $value; +// }, + + ], + // `optional` directives are only used for **unit-testing** + // If you want to use any of the `optional` directives, you have to **manually copy/paste** them to `directives`. + 'optional' => [ + 'macro' => 'Radic\\BladeExtensions\\Directives\\MacroDirective', + 'endmacro' => 'Radic\\BladeExtensions\\Directives\\EndmacroDirective', + 'macrodef' => 'Radic\\BladeExtensions\\Directives\\MacrodefDirective', + + 'markdown' => 'Radic\\BladeExtensions\\Directives\\MarkdownDirective', + 'endmarkdown' => 'Radic\\BladeExtensions\\Directives\\EndmarkdownDirective', + + 'minify' => 'Radic\\BladeExtensions\\Directives\\MinifyDirective', + 'endminify' => 'Radic\\BladeExtensions\\Directives\\EndminifyDirective', + + 'spaceless' => 'Radic\\BladeExtensions\\Directives\\SpacelessDirective', + 'endspaceless' => 'Radic\\BladeExtensions\\Directives\\EndspacelessDirective', + + 'ifsection' => 'Radic\\BladeExtensions\\Directives\\IfSectionDirective', + 'elseifsection' => 'Radic\\BladeExtensions\\Directives\\ElseIfSectionDirective', + 'endifsection' => 'Radic\\BladeExtensions\\Directives\\EndIfSectionDirective', + ], + 'version_overrides' => [ + + // 5.2 introduced @break and @continue + // but blade-extensions's @foreach relies on them so we don't yet disable them + // 5.3 introduced the loop variable for the @foreach directive. we can disable these. + // NOTE: If you have used blade-extensions's @foreach before blade-extensions:7.0.0, you probably want to remove this + // TL:DR: upgrading to blade-extension 7.0.0? then remove this + '>=5.3' => [ + 'break' => null, + 'continue' => null, + 'foreach' => null, + 'endforeach' => null, + ], + ], +]; diff --git a/config/blade_extensions.php b/config/blade_extensions.php deleted file mode 100644 index 57adcee..0000000 --- a/config/blade_extensions.php +++ /dev/null @@ -1,82 +0,0 @@ - array(), - /* - |--------------------------------------------------------------------- - | Markdown options - |--------------------------------------------------------------------- - | - */ - 'markdown' => array( - /* - |--------------------------------------------------------------------- - | Enable markdown directives - |--------------------------------------------------------------------- - | - */ - 'enabled' => true, - /* - |--------------------------------------------------------------------- - | Markdown renderer class - |--------------------------------------------------------------------- - | - | Class that renders markdown. Needs to implement Radic\BladeExtensions\Contracts\MarkdownRenderer - | - */ - 'renderer' => 'Radic\BladeExtensions\Renderers\ParsedownRenderer', - /* - |--------------------------------------------------------------------- - | Enable view compiler - |--------------------------------------------------------------------- - | - | Enables markdown view compiler. - | This will enable you to use View::make('my_markdown_file') on `my_markdown_file.md`. - | Or use @include('my_markdown_file') - | - */ - 'views' => true - ), - /* - |--------------------------------------------------------------------- - | Directives overrides - |--------------------------------------------------------------------- - | - | You can override any blade-extensions directive. - | For reference see the directives.php file in the blade-extensions/src views - */ - 'overrides' => array(/* - 'macro' => array( - 'pattern' => '/(? '$1getContainer()->getBindings())){ echo app("form")->$2($3); } ?>' - ) - */ - ), - /* - |--------------------------------------------------------------------- - | Enable example views - |--------------------------------------------------------------------- - | - | If enabled, several example views including layout, views and embed partials - | will be available under the blade-ext:: namespace. Use vendor:publish --tag=view - | to publish to your own resources folder. Based on bootstrap 3.3 - */ - 'example_views' => env('BLADE_EXTENSIONS_EXAMPLE_VIEWS', false) - -);