agallou/grunt-hash-assets-bundle
最新稳定版本:v1.0.0
Composer 安装命令:
composer require agallou/grunt-hash-assets-bundle
包简介
README 文档
README
The grunt-hash grunt plugin allows you to rename files according to their content.
For example a file named main.css will be renamed to main.54e79f6f.css.
So the file is not easy to include in a Twig template (its name will change at every content change).
This plugin adds a twig function called grunt_asset.
Usage
You can call it like this :
<link rel="stylesheet" href="{{ grunt_asset('css/main.css') }}" />
It will look for files called main*.css in the web/assets/css directory and serve it as /assets/main.54e79f6f.css.
If no file is found or more than one file is found an exception will be thrown.
Configuration
Here is the default plugin configuration :
grunt_hash_assets:
assets_dir: %kernel.root_dir%/../web/assets/
assets_base_path: /assets
统计信息
- 总下载量: 35.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-09-12