abetter / embed
A Better Laravel Embedding of Scripts & Styles,为极快的Web应用程序提供支持。
1.0.13
2021-06-06 12:17 UTC
Requires
- abetter/core: ^1.0
- patchwork/jsqueeze: ^2.0
- scssphp/scssphp: ^1.2
README
ABetter Laravel Embedd 是一个用于快速开发基于组件的Web应用程序的指令包,重点在于可扩展的静态缓存。
要求
- PHP 7.3+
- Composer 1.6+
- Laravel 6.0+
安装
通过 Composer
composer require abetter/embed
指令
@style : 在HTML源代码中嵌入Sass/CSS
@style('<relative-filename>')
@style('menu.scss')
在开发模式下,嵌入的Sass/CSS文件将被渲染为外部文件以支持Browsersync实时功能,但在Stage/Production上嵌入到HTML源代码中以提高缓存性能。
@script : 在HTML源代码中嵌入JS
@script('<relative-filename>')
@script('menu.js')
在开发模式下,嵌入的JS文件将被渲染为外部文件以支持Browsersync实时功能,但在Stage/Production上嵌入到HTML源代码中以提高缓存性能。
@svg : 在HTML源代码中嵌入svg
@svg('<filename-relative-to-resources>')
@svg('/images/logo.svg')
贡献者
Johan Sjöland johan@sjoland.com
高级产品开发人员:ABetter Story Sweden AB。
许可证
MIT许可证。有关更多信息,请参阅许可证文件。