All Projects → yeoman → Grunt Filerev

yeoman / Grunt Filerev

[DEPRECATED] File revving

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Grunt Filerev

Time Grunt
Display the elapsed execution time of grunt tasks
Stars: ✭ 531 (+103.45%)
Mutual labels:  grunt, deprecated
Grunt Csswring
DEPRECATED. Minify CSS files using PostCSS-based CSSWring
Stars: ✭ 12 (-95.4%)
Mutual labels:  grunt, deprecated
Grunt Recess
[DEPRECATED] Lint and minify CSS and LESS
Stars: ✭ 205 (-21.46%)
Mutual labels:  grunt, deprecated
python-poster
DEPRECATED Streaming HTTP uploads and multipart/form-data encoding
Stars: ✭ 16 (-93.87%)
Mutual labels:  deprecated
Drupal-Scaffold
DEPRECATED: This project has been replaced by documentation within Confluence regarding best practices for setting up a new Drupal 9 project.
Stars: ✭ 48 (-81.61%)
Mutual labels:  deprecated
VRTK.Prefabs
*Deprecated* - A collection of productive prefabs for rapidly building spatial computing solutions in the Unity software.
Stars: ✭ 61 (-76.63%)
Mutual labels:  deprecated
Bio.jl
[DEPRECATED] Bioinformatics and Computational Biology Infrastructure for Julia
Stars: ✭ 257 (-1.53%)
Mutual labels:  deprecated
Procedural-Generation
An Overview of Procedural Generation Techniques and Applications
Stars: ✭ 23 (-91.19%)
Mutual labels:  hash
lumbermill
DEPRECATED: Log Processor. See https://engineering.heroku.com/blogs/2016-05-26-heroku-metrics-there-and-back-again/ for more information.
Stars: ✭ 42 (-83.91%)
Mutual labels:  deprecated
dashboard-extension-parameter-item
⛔ DEPRECATED. This project was moved to a new repository. Visit https://github.com/DevExpress/dashboard-extensions to find an updated version.
Stars: ✭ 47 (-81.99%)
Mutual labels:  deprecated
Liquid-Application-Framework-1.0-deprecated
Liquid is a framework to speed up the development of microservices
Stars: ✭ 26 (-90.04%)
Mutual labels:  deprecated
signet
Easily compare SHA/BLAKE2 sums.
Stars: ✭ 13 (-95.02%)
Mutual labels:  hash
MalwareHashDB
Malware hashes for open source projects.
Stars: ✭ 31 (-88.12%)
Mutual labels:  hash
aldryn-bootstrap3
DEPRECATED, this project is no longer maintained, see README for more information.
Stars: ✭ 44 (-83.14%)
Mutual labels:  deprecated
tmwa
DEPRECATED: The server running The Mana World Legacy. All new projects should use Hercules instead. See the "evol-hercules" repo.
Stars: ✭ 44 (-83.14%)
Mutual labels:  deprecated
grunt-tv4
Use Grunt and Tiny Validator tv4 to validate files against json-schema draft v4
Stars: ✭ 13 (-95.02%)
Mutual labels:  grunt
invokable
Objects are functions! Treat any Object or Class as a Proc (like Enumerable but for Procs).
Stars: ✭ 40 (-84.67%)
Mutual labels:  hash
matterpoll-emoji
[DEPRECATED] Poll server for Mattermost
Stars: ✭ 38 (-85.44%)
Mutual labels:  deprecated
sha-2
SHA-2 algorithm implementations
Stars: ✭ 122 (-53.26%)
Mutual labels:  hash
ngx-mat-datetime-picker
⛔️ DEPRECATED This is no longer supported, please consider using the repository @angular-material-components/datetime-picker(https://github.com/h2qutc/angular-material-components) instead.
Stars: ✭ 29 (-88.89%)
Mutual labels:  deprecated

grunt-filerev Build Status

Static asset revisioning through file content hash

Getting Started

If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:

$ npm install --save-dev grunt-filerev

Overview

This task will revision your files based on its contents. You should then set the files to expire far into the future for better caching and it will only update when it changes.

Example

grunt.initConfig({
  filerev: {
    options: {
      algorithm: 'md5',
      length: 8
    },
    images: {
      src: 'img/**/*.{jpg,jpeg,gif,png,webp}'
    }
  }
});

Options

algorithm

Type: string
Default: 'md5'

algorithm is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are 'sha1', 'md5', 'sha256', 'sha512', etc. On recent releases, openssl list-message-digest-algorithms will display the available digest algorithms.

length

Type: number
Default: 8

Number of characters of the file hash to prefix the file name with.

process(basename, name, extension)

Type: function
Default: null
Returns: string

Function to process the revised file name and return back the new file name.

basename

Type: string

Basename of the file.

name

Type: string

Name with the revision suffixed.

extension

Type: string

The file extension.

Destination

It will overwrite the src files if you don't specify a dest:

filerev: {
  images: {
    src: ['img1.png', 'img2.png'],
    dest: 'tmp'
  }
}

Summary

The task keeps track of all files created and its sources in a summary that is exposed through the grunt.filerev.summary object. It can be used to replace references to the revved files or debugging purposes. The key of the object is the original filename, the value is the new revved path.

For a configuration like this

filerev: {
  images: {
    src: ['img1.png', 'img2.png'],
    dest: 'tmp'
  }
}

the content grunt.filerev.summary could look like that:

{
  'img1.png': 'tmp/img1.59bcc3ad.png',
  'img2.png': 'tmp/img2.060b1aa6.png'
}

Source Maps

The task will ensure that any source map for .css or .js file is revisioned with the same revision as the source file.

For example, js/main.js revisioned to js/main.9d713a59.js will also have js/main.js.map revisioned to the same hash js/main.9d713a59.js.map.

License

BSD license and copyright Google

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].