Everlaw / nbts

NetBeans TypeScript editor plugin
282 stars 46 forks source link

File test/unit/my-class.spec.ts is not in project defined by tsconfig.json #40

Closed RomkeVdMeulen closed 8 years ago

RomkeVdMeulen commented 8 years ago

I'm working on an Aurelia app. Structure (simplified) is like this:

root
 | - test
     | - unit
     | - e2e
 | - src
 | - tsconfig.json

My src files are compiled build-time, but the test files are transpiled on-the-fly by karma during test runs, so they're on the exclude list in my tsconfig.json. However, I still want autocompletion and syntax errors in my test files. But it seems that the plugin picks up that the test files are excluded from tsconfig.json and does nothing with the file, giving this error instead:

File test/unit/my-class.spec.ts is not in project defined by tsconfig.json

Is there a way around this?

jeffrey-easyesi commented 8 years ago

One thing you could do is have two tsconfig files: one named tsconfig.json for IDEs to use, which would include both src and test, and one named something else for the build process to use, which would exclude test.

RomkeVdMeulen commented 8 years ago

Solved it by removing the tests from the exclude list and configuring the files for normal build explicitly in Gulp.