0

我正在使用Fantasyon将 SVG 源文件转换为字体图标。我想个性化生成 TS 文件的输出。我设法自定义了 CSS 和 HTML,但没有自定义 TS 文件。这是我的配置:

  await generateFonts({
    name: 'icons',
    prefix: 'icon',
    inputDir: `svg`,
    fontTypes: [FontAssetType.EOT2],
    assetTypes: [OtherAssetType.HTML, OtherAssetType.SCSS, OtherAssetType.TS],
    templates:{
      scss: `/icons.scss.hbs`,
      html: `/icons.html.hbs`,
      ts: `/icons.ts.hbs`,
    },
    pathOptions: {
      ts:`icons.ts`,  
    },
  });

这是我的icons.ts.hbs文件:

   export type ICONS = 
        {{# each assets }}
        |"{{ @key }}"
        {{/ each }};

它没有考虑到它,它默认生成输出。你知道为什么吗?

4

0 回答 0