I am trying to build an NPM command which will transpile two Typescript projects that are contained in sub directories in my application and the start my server.
I have a public folder called 'src' which contains two folders, Server and Client. There are tsconfig.json files in both as they use different module systems.
I am trying to write a command in npm which will transpile both of these Typescript roots before starting the server ut can't figure out how to so it. I wuold have thought it was something similar to this if it was possible?
tsc /src/Server/*.ts && tsc /src/Client/*.ts && node /src/Server/server
Here are my two tsconfig.json files:
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
}
}
Is what I am trying to achieve possible here?
Thanks!