Closed jneuendorf closed 4 years ago
Sorry this isn't a support forum, we don't have the resources to help with everyone's TS (I am an unpaid volunteer solo maintaining right now). This also isn't related to TSDX, TSDX is for bundling code for libraries, not running scripts -- you probably want to use ts-node
or something for running scripts or just plain tsc
.
On your specific options: your exclude
is redundant, it's less than the default exclude
. baseUrl
and paths
are just for writing imports differently per platform (TSDX doesn't really support them, tsc
won't actually rewrite them), outDir
isn't supported by TSDX. Please look at the tsconfig
reference if you're not sure how these options work.
@agilgur5 Thanks for the quick and helpful reply! I will check out your hints.
The reason I asked here was that I couldn't find any information on where to ask and StackOverflow has no tsdx
tag so I figured the chances for an answers would be bad. Is there an official channel for discussions for the community?
Regular issues are fine for discussions, several are tagged as such. We also have RFCs, but historically those haven't had much response even if they're in direct response to a pattern of user needs 😕
I think you're asking about Q&A, not discussions.
I've thought about starting a gitter or Slack, but:
There's another option that is forum-style, which is more searchable and can be moderated to an extent, but:
At least on StackOverflow, you know what you're getting yourself into, there aren't false expectations of a high chance of response like an "official" chat or forum. There's also some form of "reward" to it, but:
So I don't see that any of those options really solve this problem well, and each of those, including using issues, create more of a support burden, either explicitly or implicitly (e.g. me wanting those avenues to have accurate, up-to-date information). There have only been a handful of core contributors to TSDX in its lifetime to handle that.
Also, as I said above, your question is not really a TSDX question anyway, but a more general TypeScript question.
There is now a TSDX tag on StackOverflow and also GitHub Discussions have been opened for forum-style Q&A.
Hi,
I am fairly new to TypeScript and use NPM scripts for creating cache file or generating some code. Currently I have to use JS files for that because I couldn't find a way to use
.ts
files instead and get them transpiled correctly.My code lives in
/src
and I want to have the scripts in a/script
directory and there are even output files in/lib/script/
but they are empty.My goal is being able to run something like
node lib/script/myscript.js
.I guess my
tsconfig.json
is not correctly set up for this...This config is the result of some patchwor: I started without
tsdx
and a manually created config and later tried to include parts oftsdx
's config. So I am not sure how and whetherbaseUrl
,paths
,rootDir
,outDir
andexclude
play together. 😕For more details on the actual code, see my repo theycanuse.