Git Product home page Git Product logo

filerevbundle's Introduction

ZoerbFilerevBundle

This bundle adds support for handling asset cachbusting rewrites based on a JSON configuration. It enables you to drop assetic and use frontend tooling like grunt or gulp to build and rev your assets. The only thing you need is the rev summary provided by gulp-rev or grunt-filerev and this bundle will handle everything else.

The summary file should look something like this:

{
  "/styles/main.css": "/styles/main.59983df7.css",
  "/scripts/main.js": "/scripts/main.c711a749.js"
}

Installation

Step 1: Download

composer require zoerb/filerevbundle

Step 2: Enable the bundle

Finally, enable the bundle in the kernel:

<?php
// app/appKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Zoerb\Bundle\ZoerbFilerevBundle(),
    );
}

Configuration

Add the following configuration to your app/config/config.yml:

zoerb_filerev: ~

Options

summary_file

Type: string Default value: '%kernel.root_dir%/config/filerev.json'

Points to the rev summary file

enbled

Type: bool Default value: true

debug

Type: bool Default value: %kernel.debug%

root_dir

Type: string Default Value: '%kernel.root_dir%/../web'

length

Type: int Default: 8

The number of characters of the file hash.

Changelog

See Changelog.md

Can I contribute?

Of course. We appreciate all of our contributors and welcome contributions to improve the project further. If you're uncertain whether an addition should be made, feel free to open up an issue and we can discuss it.

License

MIT © Ben Zörb

filerevbundle's People

Contributors

bezoerb avatar michaelkubovic avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.