How to implement properties preprocessing before execution like it is done in Grunt?

回眸只為那壹抹淺笑 提交于 2019-12-13 01:17:21

问题


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


来源:https://stackoverflow.com/questions/37044974/how-to-implement-properties-preprocessing-before-execution-like-it-is-done-in-gr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!