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

After callback, passing mapping object

Open PhilNehaev opened this issue 12 years ago • 0 comments

I added the ability to call a function and pass it mapping. This will flexible ways to manage output file and to fully own output format.

rev:
  options:
    after: (dirs, mapping, options) ->
      output = {}
      for oldPath, newPath of mapping
        output[path.basename oldPath] = newPath.replace dirs.webapp, ""
      grunt.file.write path.join(dirs.resources, "assetsMap.json"), JSON.stringify(output)

PhilNehaev avatar Jun 02 '13 15:06 PhilNehaev