Currently, I have set up a tsconfig.json file in combination with grunt-ts for the following grunt task:
ts: {
default: {
tsconfig: true
}
Here is the content of the tsconfig.json file:
{
"compilerOptions": {
"target": "es5",
"module": "system",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"rootDir": "app",
"outDir": "dist"
},
"exclude": [
"node_modules",
"bower_components",
"typings/main",
"typings/main.d.ts"
]
}
However, when attempting to execute this grunt task, an error TS2300 regarding duplicate identifiers occurs. Despite including exclude: "typings/main"
to prevent this issue, it only works correctly when using tsc through the command line and not with the grunt-ts task. It seems to exclude node_modules
during compilation but fails to do so with the typings file.