TypeStrong / grunt-ts

A grunt task to manage your complete typescript development to production workflow
https://www.npmjs.com/package/grunt-ts
MIT License
330 stars 121 forks source link

grunt-ts not respecting "exclude" in tsconfig #334

Closed goleary closed 8 years ago

goleary commented 8 years ago

I am using a tsconfig.json file in conjunction with grunt-ts here is the grunt task:

ts: {
    default: {
    tsconfig: true
  }

and 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"
  ]
}

When I try to run this grunt task I get an error TS2300 from duplicate identifiers. the exclude: "typings/main" is meant to avoid this, and it works when running tsc from the command line, but not when running the grunt-ts task. Somewhat confused as it is definitely excluding node_modules in the compilation, but not the typings file.

basarat commented 8 years ago

Duplicate of https://github.com/TypeStrong/grunt-ts/issues/285 . Feel free to jump in and help :rose: