Skip to content
This repository has been archived by the owner on Jan 6, 2019. It is now read-only.
/ git-digest-brunch Public archive

Adds cache busting support to Brunch via git commit SHA

Notifications You must be signed in to change notification settings

meleyal/git-digest-brunch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-digest-brunch

A Brunch plugin for cache busting urls using the SHA digest of the current git revision.

Usage

Install via npm:

npm install --save git-digest-brunch

Add the DIGEST token to any file paths you want to cache bust:

<link rel="stylesheet" href="stylesheets/app.css?DIGEST">
background-image: url('/images/hello.png?DIGEST');
canvas.image "/images/sprite.png?DIGEST", 0, 0, 150, 150
etc.

Build with brunch build --production, file paths are now cache busted:

<link rel="stylesheet" href="stylesheets/app.css?aca2b34">
background-image: url('/images/hello.png?aca2b34');
canvas.image "/images/sprite.png?aca2b34", 0, 0, 150, 150
etc.

License

The MIT License (MIT)

Copyright (c) 2014 William Meleyal (http://meleyal.com)

About

Adds cache busting support to Brunch via git commit SHA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages