Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Assets versioning task for Grunt
JavaScript CSS
Branch: master
Failed to load latest commit information.
tasks Add JSCS.
test NodeUnit → Mocha, update deps.
.gitignore initial commit
.jscs.json Add JSCS.
.travis.yml Add Travis. Chanagelog.
Gruntfile.js Add JSCS. Fix line endings. Add Travis.
package.json Add JSCS.

Assets versioning task for Grunt

Build Status Built with Grunt


This plugin requires Grunt 0.4.

Install grunt-fingerprint:

npm install grunt-fingerprint --save-dev

Add somewhere in your Gruntfile.js:


Inside your Gruntfile.js file add a section named fingerprint. See Parameters section below for details.


All parameters supports grunt.template.

src String|Array

Array of your static files (or string for single file). Newest file will be used to calculate fingerprint. Wildcards are supported.

filename String

Name of file where fingerprint will be saved. You can use target context variable here:

filename: '<%= target %>.txt'

template String

Fingerprint file contents template. You can use fingerprint context variable here:

template: "<?php define('FINGERPRINT', '<%= fingerprint %>'); ?>"

If template not specified only fingerprint will be written to file.

Config Example

fingerprint: {
  assets: {
    src: [
    filename: 'fingerprint.php',
    template: "<?php define('FINGERPRINT', '<%= fingerprint %>'); ?>"


The changelog can be found in the file.


The MIT License, see the included file.

Something went wrong with that request. Please try again.