Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.34 KB

README.md

File metadata and controls

39 lines (29 loc) · 1.34 KB

Build Status

grunt-mdfiver

Calculates md5's for cache busting. Pretty automatic, give tags you want to bust as an array (attr is the attribute containing file path). Suffix is mainly for stuff like require.js modules. The suffix is appended when renaming, and removed when injecting bust-string.

Note that this will overwrite the htmlfile, as well as rename the assets it finds, so you better use some place safe.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile

Documentation

grunt.initConfig({
    mdfiver: {
        all: {
            htmlfile: "build-dir/index.html",
            basepath: "build-dir/",
            tags: [{tag:"script", attr:"src"}, {tag:"link", attr:"href"}, {tag:"script", attr:"data-main", suffix: ".js"}]
        }
    }
... 

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

(Nothing yet)

License

Copyright (c) 2012 Juha Heimonen
Licensed under the MIT license.