pollen-solutions/asset
Composer 安装命令:
composer require pollen-solutions/asset
包简介
Pollen Solutions - Asset Component - Manage CSS styles, JS scripts, ...
README 文档
README
Pollen Solutions Asset Component provides tools to manage assets in web applications.
Allows adding of inline Css styles, adding of inline JS scripts or passing PHP vars to Js global vars to access them in your own scripts.
Installation
composer require pollen-solutions/asset
Basic Usage
use Pollen\Asset\AssetManager; $asset = new AssetManager(); // Add inline CSS $asset->addInlineCss( 'body { background-color:AliceBlue; }' ); // Add inline JS $asset->addInlineJs( 'console.log("value1"); console.log("value2"); console.log("value3");' ); // Add global JS var // -- app namespaced $asset->addGlobalJsVar('test1', 'test-value1'); // -- in footer $asset->addGlobalJsVar('test2', 'test-value2', true); // -- in footer and without namespace $asset->addGlobalJsVar('test3', 'test-value3', true, null);
Register asset
@todo
Enqueue assets
@todo
Cache and Minification
Coming soon
统计信息
- 总下载量: 524
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 3
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-09