outaTiME / grunt-replace

Replace text patterns with applause.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loading json key value replacements from file?

58bits opened this issue · comments

Is it possible to load a json key/value file, to be used for the replacement patterns?

e.g. mapping.json

{
  "scripts/app.min.js": "scripts/app.min.1c89c881.js",
  "css/style.min.css": "css/style.min.ac82b1f1.css"
}

Okay - I think I can go...

{
  patterns: [
    {
      json: grunt.file.readJSON('mapping.json')
    }
  ]
}