I got an issue in typescript. I have the following hierarchy :
.
+-- @types
| +-- declaration1.ts
| +-- declaration2.ts
+-- common
| +-- utils1.ts
| +-- utils2.ts
+-- tests
| +-- utils1.test.ts
| +-- utils2.test.ts
In my tsconfig.json, i put this configuration to have all my types exposed in both tests and commons (or vscode complains) :
{
"compilerOptions": {
"outDir": "build/",
},
"include": ["tests", "common", "@types"]
}
My problem is, that i don't want to compile all this stuffs, i just want to compile the commons (which are utils, i cannot get a single (or even multiple) entrypoint(s)).
So i'd like to type tsc
and get a build
folder fill like this :
.
+-- build
| +-- common
| | +-- utils1.js
| | +-- utils2.js
// nothing else
Instead i got this :
.
+-- build
| +-- @types
| | +-- declaration1.js
| | +-- declaration2.js
| +-- common
| | +-- utils1.js
| | +-- utils2.js
| +-- tests
| | +-- utils1.test.js
| | +-- utils2.test.js
I cannot get how to exclude this directories from compiles.
Thanks if anyone has an idea.