I'm using Sublime Typescript Plugin to transpile Typescript files.
Project folder
I've done all the setup for a sample project with help of tsconfig.json(using Typescript 1.5V). Below is my 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":""
}
}
To move all the sourceMap files into other folder(mapFiles) folder rather than keeping in all the files(.js and .map files) in same folder, I've added below config into tsconfig.json
"mapRoot":"mapFiles",
"sourceMap": true,
"sourceRoot": "mapFiles",
After done the build, Script files are generated successfully along with sourceMappingURL comments. Below is the out of main.ts file.
var x = "will work";
//# sourceMappingURL=E:/type/projects/Examples/ex1/mapFiles/main.js.map
But main.js.map file is not moved the respective folder(mapFiles). It is in same folder where the js file is generated.
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.
Please let me know how to move sourceMap files to other folders on run-time.