Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0.0 #16

Merged
merged 4 commits into from
Nov 18, 2018
Merged

v2.0.0 #16

merged 4 commits into from
Nov 18, 2018

Conversation

Log1x
Copy link
Owner

@Log1x Log1x commented Nov 17, 2018

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.

Convert functions into static methods under the BladeSvgSage class
Rewrite method that handles returning the cache busted SVG
Keep existing get_svg helper but change to App namespace for global usage within Sage
Register SvgFactory and Directives during class initilization
Update blade-svg to 0.2.1

Clean up README
Add MIT License
Load BladeSvgSage with PSR-4
Lots of other little clean up / breaking changes– this is still a work in progress.
@Log1x Log1x mentioned this pull request Nov 17, 2018
…standards

Remove RelPath dependency
Bump blade-svg to 0.3.0
Register BladeSvgSage with the sage container
Remove a lot of unnecessary methods, instead falling back on blade-svg's internal methods for handling pathing, etc.
Add @spritesheet directive
Add config.php housing the default config that gets merged with the bladesvg filter
Replace all existing configuration filters with bladesvg which accepts an array of values
Replace helper functions with svg_image and svg_spritesheet, conforming with blade-svg
Automatically handle theme pathing when passing a customized path for svg_path and spritesheet_path
Update README with the new configuration filter as well as removing usage examples and instead referring to the original Blade SVG documentation as everything is now 1:1
@Log1x Log1x merged commit 3aa2f4d into master Nov 18, 2018
@Log1x Log1x deleted the v2.0.0 branch November 18, 2018 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant