如何在Grunt中执行属性预处理?

Grunt具有用于在执行任务之前设置和更新configuration属性的语法。

例如,

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

成为记忆中的…

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

npm模块负责这个? 请告诉我如何以更好的方式实现它? 谢谢!

Grunt中的模板string来自Lo-Dash包。

参考文献:

  • Grunt.template
  • LoDash模板