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

Add support for path prefixes

Open Dragory opened this issue 10 years ago • 0 comments

This PR adds support for adding prefixes to the generated paths in the mapping file.

An example use case:

src: assets/css/min/*.css dest: assets/css/hash/

desired key: css/ desired value: css/

Can be accomplished with this config:

{
  options: {
    mapping: 'hashes.json',
    srcBasePath: 'assets/css/min/',
    destBasePath: 'assets/css/hash/',

    srcPathPrefix: 'css/',
    destPathPrefix: 'css/'
  },
  src: 'assets/css/min/*.css',
  dest: 'assets/css/hash/'
}

Dragory avatar Apr 17 '14 08:04 Dragory