我正在使用Sublime Typescript插件来转录Typescript文件。无法将SourceMap(.map)文件移动到Typescript中的单独文件夹中
项目文件夹
我已经做了所有的设置的示例项目与tsconfig.json的帮助(使用1.5V打字稿)。下面是我tsconfig.json
{
"compilerOptions": {
"declaration":false,
"mapRoot":"mapFiles",
"module": "commonjs",
"noImplicitAny": true,
"outDir": "js",
"preserveConstEnums": true,
"removeComments": true,
"sourceMap": true,
"sourceRoot": "mapFiles",
"target":"es3",
"watch":true,
"rootDir":""
}
}
要将所有sourceMap文件移动到其他文件夹(映射文件)的文件夹,而不是在同一个文件夹中的所有文件(.js文件和文件.MAP)保持一致,我已经下面添加到配置tsconfig.json
"mapRoot":"mapFiles",
"sourceMap": true,
"sourceRoot": "mapFiles",
完成构建之后,脚本文件与sourceMappingURL意见一起成功生成。下面是出来的main.ts文件。
var x = "will work";
//# sourceMappingURL=E:/type/projects/Examples/ex1/mapFiles/main.js.map
但main.js.map文件没有移动相应的文件夹(mapFiles)。它位于生成js文件的相同文件夹中。
Below is my understanding about .maps files:
1. Map files have the details about the respective .ts files with location of it.
2. it is used to track down .ts files easily.
请让我知道如何在运行时将sourceMap文件移动到其他文件夹。