Hexo Typescript渲染插件 hexo-renderer-ts
本文于 1135 天之前发表,文中内容可能已经过时。
hexo-renderer-ts插件用于渲染typescript文件。使用此插件可以让Hexo支持Typescript。
插件选项
Typescript编译详细选项请看: https://www.typescriptlang.org/docs/handbook/compiler-options.html
使用_config.yml文件配置
在 _config.yml
中:
render:
ts:
target: ES2015
removeComments: true
newLine: Lf
pretty: false
使用tsconfig.json文件配置
render:
ts: tsconfig.json # path to tsconfig.json file
使用 API进行配置:
hexo.render.render({text: '', engine: 'ts'}, {
target: 'ES2015',
removeComments: true,
newLine: 'Lf',
pretty: false}).then(function(result){
// ...
});
评论系统未开启,无法评论!