A full refactor is in the works for Blade SVG Sage. This will include breaking changes but allow for much better maintainability moving forward.
Changelog
Refactor/rewrite existing functions/helpers, converting them into static methods inside of the BladeSvgSage class with a more appropriate naming scheme.
Remove a lot of unnecessary methods instead falling back onto blade-svg's internal methods for handling pathing, etc.
Add config.php for housing the default configuration values.
Replace existing configuration filters with a single filter, bladesvg, that accepts an array of values that get merged with the defaults.
Remove the need to specify a full path when passing a custom svg_path and spritesheet_path (now defaults to theme root).
Register the SvgFactory and Blade directives during the initialization of the BladeSvgSage class within after_setup_theme instead of awkwardly calling the action/filter twice.
Register BladeSvgSage with the sage container.
Default svg_path and spritesheet_path to resources/svg and resources/svg/spritesheet.svg respectively to not only conform with vanilla Blade SVG and Laravel standards but remove the unnecessary issues that arise from the build process and BrowserSync.
Move svg_image() and svg_spritesheet() to the App namespace for use globally throughout Sage.
Add empty() conditionals for $icon on methods where it is being used for a more graceful return instead of erroring.
Change BladeSvgSage autoloading to PSR-4.
Remove RelPath dependency.
Bump dependencies & lock file.
Add the missing description, support, and keywords fields to composer.json.
Add MIT license for good measure.
Clean up .editorconfig and .gitignore.
Clean up and reword various sections of the readme, update configuration to reflect filter change, remove existing usage examples instead replacing it with a link to the Basic examples from the Blade SVG documentation.
A full refactor is in the works for Blade SVG Sage. This will include breaking changes but allow for much better maintainability moving forward.
Changelog
BladeSvgSage
class with a more appropriate naming scheme.config.php
for housing the default configuration values.bladesvg
, that accepts an array of values that get merged with the defaults.svg_path
andspritesheet_path
(now defaults to theme root).SvgFactory
and Blade directives during the initialization of theBladeSvgSage
class withinafter_setup_theme
instead of awkwardly calling the action/filter twice.sage
container.svg_path
andspritesheet_path
toresources/svg
andresources/svg/spritesheet.svg
respectively to not only conform with vanilla Blade SVG and Laravel standards but remove the unnecessary issues that arise from the build process and BrowserSync.svg_image()
andsvg_spritesheet()
to theApp
namespace for use globally throughout Sage.empty()
conditionals for$icon
on methods where it is being used for a more graceful return instead of erroring.BladeSvgSage
autoloading to PSR-4.composer.json
..editorconfig
and.gitignore
.