2017 © Pedro Peláez
 

symfony-bundle grunt-hash-assets-bundle

image

agallou/grunt-hash-assets-bundle

  • Friday, September 12, 2014
  • by agallou
  • Repository
  • 1 Watchers
  • 0 Stars
  • 806 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

GruntHashAssetsBundle

The grunt-hash grunt plugin allows you to rename files according to their content., (*1)

For example a file named main.css will be renamed to main.54e79f6f.css., (*2)

So the file is not easy to include in a Twig template (its name will change at every content change)., (*3)

This plugin adds a twig function called grunt_asset., (*4)

Usage

You can call it like this :, (*5)

<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., (*6)

If no file is found or more than one file is found an exception will be thrown., (*7)

Configuration

Here is the default plugin configuration :, (*8)

grunt_hash_assets:
    assets_dir: %kernel.root_dir%/../web/assets/
    assets_base_path: /assets

The Versions

12/09 2014

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

grunt assets

12/09 2014

v0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

 

grunt assets