abetter/embed

A Better Laravel Embedding of Scripts & Styles, for exceptionally fast web applications.

1.0.13 2021-06-06 12:17 UTC

This package is auto-updated.

Last update: 2024-11-06 20:14:58 UTC


README

Packagist Version Latest Stable Version Total Downloads License

ABetter Laravel Embedd is a package of directives for faster development of component-based web applications, with focus on scalable static caching.

Requirements

  • PHP 7.3+
  • Composer 1.6+
  • Laravel 6.0+

Installation

Via Composer:

composer require abetter/embed

Directives

@style : Embedd sass/css in html source code

@style('<relative-filename>')
@style('menu.scss')

Embedded Sass/CSS files will be rendered as external files in development mode to support browsersync live, but will be embedded in html source on Stage/Production for better caching.

@script : Embedd js in html source code

@script('<relative-filename>')
@script('menu.js')

Embedded JS files will be rendered as external files in development mode to support browsersync live, but will be embedded in html source on Stage/Production for better caching.

@svg : Embedd svg in html source code

@svg('<filename-relative-to-resources>')
@svg('/images/logo.svg')

Contributors

Johan Sjöland johan@sjoland.com
Senior Product Developer: ABetter Story Sweden AB.

License

MIT license. Please see the license file for more information.