【发布时间】:2017-12-26 23:39:06
【问题描述】:
我正在尝试使用 gulp 任务从 JSON 配置创建一个打字稿类。
input
{
"ApiEndpoint": "http://localhost:5000/api"
}
希望得到类似的输出
public static get ApiEndpoint(): string {
return "http://localhost:5000/api";
}
尝试使用 gulp-ts-config 但它在 template.ts 中引发错误。不知何故,我无法让它在我的系统中工作。有没有其他的 gulp 插件可以通过我们实现相同的功能?
【问题讨论】:
-
你用
gulp-ts-config插件试过什么?您应该知道,这里不是要求工具推荐的地方。 -
我可以知道你为什么想要这种类型的输出吗?
标签: typescript gulp