grunt-filerev icon indicating copy to clipboard operation
grunt-filerev copied to clipboard

Store filerev summary to file and strip summary paths

Open eversteini opened this issue 9 years ago • 3 comments

This feature offers two possibility:

  • storing the filerev summary to a file
  • stripping the src/dest paths of the filerev summary

Therefore two option parameters are supported:

  • summaryFilePath
  • stripPath

summaryFilePath defines the path, where the filerev summary should be stored. stripPath can be used to strip the src/dest summary paths. The value can either be a string, or an object with the properties src and dest. If only a string is passed, this string is removed from all src and dest paths. If an object is passed, src and dest paths get treated individually.

Example:

options: {
      algorithm: 'md5',
      length: 8,
      summaryFilePath: './tasks/filerevsummary.json',
      stripPath: {
        src: 'assets',
        dest: '.tmp/public'
      }
    },

My use-case: I implemented this feature because I needed the filerev summary in a view helper to provide the hashed source path when a view gets loaded. Therefore the summary had to be stored somewhere locally.

eversteini avatar Mar 20 '15 11:03 eversteini

Hi, any updates on this? @eversteini @kevva

I found these features really useful and having them merged would be great :pray:

Strajk avatar Apr 01 '16 07:04 Strajk

I would also like to have this feature merged. I am using the fork from @eversteini at the moment. @kevva ?

thomasfr avatar May 23 '16 15:05 thomasfr

We are now working with this additional feature since more than a year and everything is working fine. It would be cool if this could be merged.

eversteini avatar May 23 '16 15:05 eversteini