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

Visual Studio config issue: {} when src contains nested arrays #353

Closed davidparsson closed 8 years ago

davidparsson commented 8 years ago

I'm seeing this error in 5.3.0, 5.3.1, 5.3.2 and 5.4.0, but not in 5.2.0:

Running "ts:app" (ts) task
Visual Studio config issue: {}
Warning: Task "ts:app" failed. Use --force to continue.

What caused this in my case seems to be that my src contains nested arrays. My configuration looks kind of like this:

applicationSources: [
  "app/file1.ts",
  "app/file2.ts"
],
ts: {
  app: {
    src: [
      "dependencies.ts",
      "<%= applicationSources %>"
    ],
    dest: "build/app.js"
  }
}

Grunt expands <%= applicationSources %>, turning src into this:

src: [
  "dependencies.ts",
  [
    "app/file1.ts",
    "app/file2.ts"
  ]
],
davidparsson commented 8 years ago

Oops, I found #323.