I'm currently working on setting up an NPM command to transpile two separate Typescript projects located in subdirectories within my application, followed by starting the server.
Within my 'src' public folder, I have 'Server' and 'Client' directories each with their own tsconfig.json files due to different module systems being used.
I'm attempting to create an npm command that will transpile both of these Typescript projects before launching the server but I'm struggling with finding the correct way to do so. I had initially thought it might look something like this:
tsc /src/Server/*.ts && tsc /src/Client/*.ts && node /src/Server/server
Below are the contents of the two tsconfig.json files for reference:
In /src/Server
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"sourceMap": true
},
"exclude": [
"node_modules"
]
}
And in /src/Client
{
"compilerOptions": {
"target": "ES5",
"module": "system",
"moduleResolution": "node",
"sourceMap": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
}
}
Are there any viable solutions to achieving what I've described above?
Thank you in advance!