我创建了一个空白HTML application with TypeScript
using File > New > Project
在VS2015中。
我在一个中添加了一个基本的 tsconfig.json/scripts
文件夹并期望 VS 读取该文件并将 .js 文件输出到不同的文件夹中。不幸的是,什么也没发生。虽然 VS 甚至没有找到tsconfig.json
还有其他人遇到这个问题吗?
我知道 1.5 之前有一个问题,但之前的修复似乎不起作用:https://github.com/Microsoft/TypeScript/issues/4300
---------------- 更新 9/10/2015
这是 tsconfig.json 的一个示例
{
"compilerOptions": {
"noImplicitAny": false,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es5",
"module": "amd",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"outDir": "../www/scripts/"
},
"files": [
"./scripts/index.ts"
]
}
这是另一个 tsconfig.json
{
"compilerOptions": {
"target": "es5",
"out": "/wwwroot/scripts/appBundle.js",
"sourceMap": true,
"removeComments": true,
"sourceRoot": "/"
}
}
我已经为 TypeScript + Cordova 项目创建了 tsconfig.json 文件,并且它们工作正常。