How to implement properties preprocessing before e

2019-07-28 03:42发布

问题:

Grunt has syntax which is used to set and update configuration properties before task execution.

For example,

config {
  dist: {
     dir: "dir1"
  },
  clean: {
      dirs: [
          '<dist.dir>'
      ]
  }
}

becomes in memory to ...

config {
  dist: {
     dir: "dir1"
  },
  clean: {
      dirs: [
          "dir1"
      ]
  }
}

What npm module is responsible for this? Please, advice me how to implement it in a better way? Thank you!

回答1:

Template Strings within Grunt come from the Lo-Dash package.

References:

  • Grunt.template
  • LoDash Template