addHelper

针对于文本类型文件,增加 Handlebars 的自定义 Help 函数,具体可查看文档Custom Helpers

该方法可在 onForged 生命周期的 api 参数上获取。

其类型定义为:

export type ForgedAPI = {
  addHelper: (name: string, fn: Handlebars.HelperDelegate) => void;
  ...
};

name

help 函数名称。

fn

help 函数实现。

ON THIS PAGE
,